• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_TEST_LOGIN_UTILS_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_TEST_LOGIN_UTILS_H_
7 
8 #include "base/memory/ref_counted.h"
9 #include "chrome/browser/chromeos/login/auth/authenticator.h"
10 #include "chrome/browser/chromeos/login/auth/user_context.h"
11 #include "chrome/browser/chromeos/login/login_utils.h"
12 #include "google_apis/gaia/google_service_auth_error.h"
13 #include "testing/gtest/include/gtest/gtest.h"
14 
15 class Profile;
16 
17 namespace chromeos {
18 
19 class LoginStatusConsumer;
20 
21 class TestLoginUtils : public LoginUtils {
22  public:
23   explicit TestLoginUtils(const UserContext& user_context);
24   virtual ~TestLoginUtils();
25 
26   // LoginUtils:
DoBrowserLaunch(Profile * profile,LoginDisplayHost * login_host)27   virtual void DoBrowserLaunch(Profile* profile,
28                                LoginDisplayHost* login_host) OVERRIDE {}
29   virtual void PrepareProfile(const UserContext& user_context,
30                               bool has_cookies,
31                               bool has_active_session,
32                               Delegate* delegate) OVERRIDE;
33   virtual void DelegateDeleted(Delegate* delegate) OVERRIDE;
CompleteOffTheRecordLogin(const GURL & start_url)34   virtual void CompleteOffTheRecordLogin(const GURL& start_url) OVERRIDE {}
35   virtual scoped_refptr<Authenticator> CreateAuthenticator(
36       LoginStatusConsumer* consumer) OVERRIDE;
37 
38  private:
39   UserContext expected_user_context_;
40 
41   DISALLOW_COPY_AND_ASSIGN(TestLoginUtils);
42 };
43 
44 }  // namespace chromeos
45 
46 #endif  // CHROME_BROWSER_CHROMEOS_LOGIN_TEST_LOGIN_UTILS_H_
47