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