| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 // OAuth2AccessTokenConsumer methods. | 167 // OAuth2AccessTokenConsumer methods. |
| 168 virtual void OnGetTokenSuccess(const std::string& access_token, | 168 virtual void OnGetTokenSuccess(const std::string& access_token, |
| 169 const base::Time& expiration_time) OVERRIDE; | 169 const base::Time& expiration_time) OVERRIDE; |
| 170 virtual void OnGetTokenFailure(const GoogleServiceAuthError& error) OVERRIDE; | 170 virtual void OnGetTokenFailure(const GoogleServiceAuthError& error) OVERRIDE; |
| 171 | 171 |
| 172 // syncer::InvalidationHandler implementation. | 172 // syncer::InvalidationHandler implementation. |
| 173 virtual void OnInvalidatorStateChange( | 173 virtual void OnInvalidatorStateChange( |
| 174 syncer::InvalidatorState state) OVERRIDE; | 174 syncer::InvalidatorState state) OVERRIDE; |
| 175 virtual void OnIncomingInvalidation( | 175 virtual void OnIncomingInvalidation( |
| 176 const syncer::ObjectIdStateMap& id_state_map, | 176 const syncer::ObjectIdInvalidationMap& invalidation_map, |
| 177 syncer::IncomingInvalidationSource source) OVERRIDE; | 177 syncer::IncomingInvalidationSource source) OVERRIDE; |
| 178 | 178 |
| 179 // Expose access token accessors for test purposes. | 179 // Expose access token accessors for test purposes. |
| 180 const std::string& GetAccessTokenForTest() const; | 180 const std::string& GetAccessTokenForTest() const; |
| 181 void SetAccessTokenForTest(const std::string& access_token); | 181 void SetAccessTokenForTest(const std::string& access_token); |
| 182 | 182 |
| 183 private: | 183 private: |
| 184 friend class MockChromeToMobileService; | 184 friend class MockChromeToMobileService; |
| 185 | 185 |
| 186 // Enable or disable Chrome To Mobile with the browsers' command controllers. | 186 // Enable or disable Chrome To Mobile with the browsers' command controllers. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 base::OneShotTimer<ChromeToMobileService> auth_retry_timer_; | 249 base::OneShotTimer<ChromeToMobileService> auth_retry_timer_; |
| 250 base::OneShotTimer<ChromeToMobileService> search_retry_timer_; | 250 base::OneShotTimer<ChromeToMobileService> search_retry_timer_; |
| 251 | 251 |
| 252 // A queue of tasks to perform after an access token is lazily initialized. | 252 // A queue of tasks to perform after an access token is lazily initialized. |
| 253 std::queue<base::Closure> task_queue_; | 253 std::queue<base::Closure> task_queue_; |
| 254 | 254 |
| 255 DISALLOW_COPY_AND_ASSIGN(ChromeToMobileService); | 255 DISALLOW_COPY_AND_ASSIGN(ChromeToMobileService); |
| 256 }; | 256 }; |
| 257 | 257 |
| 258 #endif // CHROME_BROWSER_CHROME_TO_MOBILE_SERVICE_H_ | 258 #endif // CHROME_BROWSER_CHROME_TO_MOBILE_SERVICE_H_ |
| OLD | NEW |