| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_SIGNIN_CORE_BROWSER_TEST_SIGNIN_CLIENT_H_ | 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_TEST_SIGNIN_CLIENT_H_ |
| 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_TEST_SIGNIN_CLIENT_H_ | 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_TEST_SIGNIN_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 #if defined(OS_IOS) | 82 #if defined(OS_IOS) |
| 83 ios::FakeProfileOAuth2TokenServiceIOSProvider* GetIOSProviderAsFake(); | 83 ios::FakeProfileOAuth2TokenServiceIOSProvider* GetIOSProviderAsFake(); |
| 84 #endif | 84 #endif |
| 85 | 85 |
| 86 void set_are_signin_cookies_allowed(bool value) { | 86 void set_are_signin_cookies_allowed(bool value) { |
| 87 are_signin_cookies_allowed_ = value; | 87 are_signin_cookies_allowed_ = value; |
| 88 } | 88 } |
| 89 | 89 |
| 90 // SigninClient overrides: | 90 // SigninClient overrides: |
| 91 void SetSigninProcess(int host_id) override; | |
| 92 void ClearSigninProcess() override; | |
| 93 bool IsSigninProcess(int host_id) const override; | |
| 94 bool HasSigninProcess() const override; | |
| 95 bool IsFirstRun() const override; | 91 bool IsFirstRun() const override; |
| 96 base::Time GetInstallDate() override; | 92 base::Time GetInstallDate() override; |
| 97 bool AreSigninCookiesAllowed() override; | 93 bool AreSigninCookiesAllowed() override; |
| 98 void AddContentSettingsObserver( | 94 void AddContentSettingsObserver( |
| 99 content_settings::Observer* observer) override; | 95 content_settings::Observer* observer) override; |
| 100 void RemoveContentSettingsObserver( | 96 void RemoveContentSettingsObserver( |
| 101 content_settings::Observer* observer) override; | 97 content_settings::Observer* observer) override; |
| 102 | 98 |
| 103 private: | 99 private: |
| 104 // Loads the token database. | 100 // Loads the token database. |
| 105 void LoadDatabase(); | 101 void LoadDatabase(); |
| 106 | 102 |
| 107 base::ScopedTempDir temp_dir_; | 103 base::ScopedTempDir temp_dir_; |
| 108 scoped_refptr<net::URLRequestContextGetter> request_context_; | 104 scoped_refptr<net::URLRequestContextGetter> request_context_; |
| 109 scoped_refptr<TokenWebData> database_; | 105 scoped_refptr<TokenWebData> database_; |
| 110 int signin_host_id_; | |
| 111 PrefService* pref_service_; | 106 PrefService* pref_service_; |
| 112 bool are_signin_cookies_allowed_; | 107 bool are_signin_cookies_allowed_; |
| 113 | 108 |
| 114 // Pointer to be filled by PostSignedIn. | 109 // Pointer to be filled by PostSignedIn. |
| 115 std::string signed_in_password_; | 110 std::string signed_in_password_; |
| 116 | 111 |
| 117 #if defined(OS_IOS) | 112 #if defined(OS_IOS) |
| 118 scoped_ptr<ios::FakeProfileOAuth2TokenServiceIOSProvider> iosProvider_; | 113 scoped_ptr<ios::FakeProfileOAuth2TokenServiceIOSProvider> iosProvider_; |
| 119 #endif | 114 #endif |
| 120 | 115 |
| 121 DISALLOW_COPY_AND_ASSIGN(TestSigninClient); | 116 DISALLOW_COPY_AND_ASSIGN(TestSigninClient); |
| 122 }; | 117 }; |
| 123 | 118 |
| 124 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_TEST_SIGNIN_CLIENT_H_ | 119 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_TEST_SIGNIN_CLIENT_H_ |
| OLD | NEW |