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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // in the default constructor. | 58 // in the default constructor. |
59 void SetURLRequestContext(net::URLRequestContextGetter* request_context); | 59 void SetURLRequestContext(net::URLRequestContextGetter* request_context); |
60 | 60 |
61 #if defined(OS_IOS) | 61 #if defined(OS_IOS) |
62 virtual ios::ProfileOAuth2TokenServiceIOSProvider* GetIOSProvider() override; | 62 virtual ios::ProfileOAuth2TokenServiceIOSProvider* GetIOSProvider() override; |
63 #endif | 63 #endif |
64 | 64 |
65 // Returns true. | 65 // Returns true. |
66 bool ShouldMergeSigninCredentialsIntoCookieJar() override; | 66 bool ShouldMergeSigninCredentialsIntoCookieJar() override; |
67 | 67 |
68 // Does nothing. | 68 // Registers |callback| and returns the subscription. |
69 scoped_ptr<CookieChangedCallbackList::Subscription> AddCookieChangedCallback( | 69 // Note that |callback| will never be called. |
70 const CookieChangedCallback& callback) override; | 70 scoped_ptr<SigninClient::CookieChangedSubscription> AddCookieChangedCallback( |
| 71 const GURL& url, |
| 72 const std::string& name, |
| 73 const net::CookieStore::CookieChangedCallback& callback) override; |
71 | 74 |
72 #if defined(OS_IOS) | 75 #if defined(OS_IOS) |
73 ios::FakeProfileOAuth2TokenServiceIOSProvider* GetIOSProviderAsFake(); | 76 ios::FakeProfileOAuth2TokenServiceIOSProvider* GetIOSProviderAsFake(); |
74 #endif | 77 #endif |
75 | 78 |
76 // SigninClient overrides: | 79 // SigninClient overrides: |
77 void SetSigninProcess(int host_id) override; | 80 void SetSigninProcess(int host_id) override; |
78 void ClearSigninProcess() override; | 81 void ClearSigninProcess() override; |
79 bool IsSigninProcess(int host_id) const override; | 82 bool IsSigninProcess(int host_id) const override; |
80 bool HasSigninProcess() const override; | 83 bool HasSigninProcess() const override; |
81 bool IsFirstRun() const override; | 84 bool IsFirstRun() const override; |
82 base::Time GetInstallDate() override; | 85 base::Time GetInstallDate() override; |
83 | 86 |
84 private: | 87 private: |
85 // Loads the token database. | 88 // Loads the token database. |
86 void LoadDatabase(); | 89 void LoadDatabase(); |
87 | 90 |
88 base::ScopedTempDir temp_dir_; | 91 base::ScopedTempDir temp_dir_; |
89 scoped_refptr<net::URLRequestContextGetter> request_context_; | 92 scoped_refptr<net::URLRequestContextGetter> request_context_; |
90 scoped_refptr<TokenWebData> database_; | 93 scoped_refptr<TokenWebData> database_; |
91 int signin_host_id_; | 94 int signin_host_id_; |
92 CookieChangedCallbackList cookie_callbacks_; | |
93 | |
94 PrefService* pref_service_; | 95 PrefService* pref_service_; |
95 | 96 |
96 #if defined(OS_IOS) | 97 #if defined(OS_IOS) |
97 scoped_ptr<ios::FakeProfileOAuth2TokenServiceIOSProvider> iosProvider_; | 98 scoped_ptr<ios::FakeProfileOAuth2TokenServiceIOSProvider> iosProvider_; |
98 #endif | 99 #endif |
99 | 100 |
100 DISALLOW_COPY_AND_ASSIGN(TestSigninClient); | 101 DISALLOW_COPY_AND_ASSIGN(TestSigninClient); |
101 }; | 102 }; |
102 | 103 |
103 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_TEST_SIGNIN_CLIENT_H_ | 104 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_TEST_SIGNIN_CLIENT_H_ |
OLD | NEW |