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_CHROME_TO_MOBILE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROME_TO_MOBILE_SERVICE_H_ |
6 #define CHROME_BROWSER_CHROME_TO_MOBILE_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROME_TO_MOBILE_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <queue> | 9 #include <queue> |
10 #include <set> | 10 #include <set> |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 // OAuth2AccessTokenConsumer methods. | 145 // OAuth2AccessTokenConsumer methods. |
146 virtual void OnGetTokenSuccess(const std::string& access_token, | 146 virtual void OnGetTokenSuccess(const std::string& access_token, |
147 const base::Time& expiration_time) OVERRIDE; | 147 const base::Time& expiration_time) OVERRIDE; |
148 virtual void OnGetTokenFailure(const GoogleServiceAuthError& error) OVERRIDE; | 148 virtual void OnGetTokenFailure(const GoogleServiceAuthError& error) OVERRIDE; |
149 | 149 |
150 // syncer::InvalidationHandler implementation. | 150 // syncer::InvalidationHandler implementation. |
151 virtual void OnInvalidatorStateChange( | 151 virtual void OnInvalidatorStateChange( |
152 syncer::InvalidatorState state) OVERRIDE; | 152 syncer::InvalidatorState state) OVERRIDE; |
153 virtual void OnIncomingInvalidation( | 153 virtual void OnIncomingInvalidation( |
154 const syncer::ObjectIdInvalidationMap& invalidation_map, | 154 const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE; |
155 syncer::IncomingInvalidationSource source) OVERRIDE; | |
156 | 155 |
157 // Expose access token accessors for test purposes. | 156 // Expose access token accessors for test purposes. |
158 const std::string& GetAccessTokenForTest() const; | 157 const std::string& GetAccessTokenForTest() const; |
159 void SetAccessTokenForTest(const std::string& access_token); | 158 void SetAccessTokenForTest(const std::string& access_token); |
160 | 159 |
161 private: | 160 private: |
162 friend class MockChromeToMobileService; | 161 friend class MockChromeToMobileService; |
163 | 162 |
164 // Handle the attempted creation of a temporary file for snapshot generation. | 163 // Handle the attempted creation of a temporary file for snapshot generation. |
165 void SnapshotFileCreated(base::WeakPtr<Observer> observer, | 164 void SnapshotFileCreated(base::WeakPtr<Observer> observer, |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 base::OneShotTimer<ChromeToMobileService> auth_retry_timer_; | 225 base::OneShotTimer<ChromeToMobileService> auth_retry_timer_; |
227 base::OneShotTimer<ChromeToMobileService> search_retry_timer_; | 226 base::OneShotTimer<ChromeToMobileService> search_retry_timer_; |
228 | 227 |
229 // A queue of tasks to perform after an access token is lazily initialized. | 228 // A queue of tasks to perform after an access token is lazily initialized. |
230 std::queue<base::Closure> task_queue_; | 229 std::queue<base::Closure> task_queue_; |
231 | 230 |
232 DISALLOW_COPY_AND_ASSIGN(ChromeToMobileService); | 231 DISALLOW_COPY_AND_ASSIGN(ChromeToMobileService); |
233 }; | 232 }; |
234 | 233 |
235 #endif // CHROME_BROWSER_CHROME_TO_MOBILE_SERVICE_H_ | 234 #endif // CHROME_BROWSER_CHROME_TO_MOBILE_SERVICE_H_ |
OLD | NEW |