| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // OAuth2AccessTokenConsumer methods. | 153 // OAuth2AccessTokenConsumer methods. |
| 154 virtual void OnGetTokenSuccess(const std::string& access_token, | 154 virtual void OnGetTokenSuccess(const std::string& access_token, |
| 155 const base::Time& expiration_time) OVERRIDE; | 155 const base::Time& expiration_time) OVERRIDE; |
| 156 virtual void OnGetTokenFailure(const GoogleServiceAuthError& error) OVERRIDE; | 156 virtual void OnGetTokenFailure(const GoogleServiceAuthError& error) OVERRIDE; |
| 157 | 157 |
| 158 // syncer::SyncNotifierObserver implementation. | 158 // syncer::SyncNotifierObserver implementation. |
| 159 virtual void OnNotificationsEnabled() OVERRIDE; | 159 virtual void OnNotificationsEnabled() OVERRIDE; |
| 160 virtual void OnNotificationsDisabled( | 160 virtual void OnNotificationsDisabled( |
| 161 syncer::NotificationsDisabledReason reason) OVERRIDE; | 161 syncer::NotificationsDisabledReason reason) OVERRIDE; |
| 162 virtual void OnIncomingNotification( | 162 virtual void OnIncomingNotification( |
| 163 const syncer::ObjectIdPayloadMap& id_payloads, | 163 const syncer::ObjectIdStateMap& id_state_map, |
| 164 syncer::IncomingNotificationSource source) OVERRIDE; | 164 syncer::IncomingNotificationSource source) OVERRIDE; |
| 165 | 165 |
| 166 // Expose access token accessors for test purposes. | 166 // Expose access token accessors for test purposes. |
| 167 const std::string& GetAccessTokenForTest() const; | 167 const std::string& GetAccessTokenForTest() const; |
| 168 void SetAccessTokenForTest(const std::string& access_token); | 168 void SetAccessTokenForTest(const std::string& access_token); |
| 169 | 169 |
| 170 private: | 170 private: |
| 171 friend class MockChromeToMobileService; | 171 friend class MockChromeToMobileService; |
| 172 | 172 |
| 173 // Enable or disable Chrome To Mobile with the browsers' command controllers. | 173 // Enable or disable Chrome To Mobile with the browsers' command controllers. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 scoped_ptr<OAuth2AccessTokenFetcher> access_token_fetcher_; | 228 scoped_ptr<OAuth2AccessTokenFetcher> access_token_fetcher_; |
| 229 base::OneShotTimer<ChromeToMobileService> auth_retry_timer_; | 229 base::OneShotTimer<ChromeToMobileService> auth_retry_timer_; |
| 230 | 230 |
| 231 // A queue of tasks to perform after an access token is lazily initialized. | 231 // A queue of tasks to perform after an access token is lazily initialized. |
| 232 std::queue<base::Closure> task_queue_; | 232 std::queue<base::Closure> task_queue_; |
| 233 | 233 |
| 234 DISALLOW_COPY_AND_ASSIGN(ChromeToMobileService); | 234 DISALLOW_COPY_AND_ASSIGN(ChromeToMobileService); |
| 235 }; | 235 }; |
| 236 | 236 |
| 237 #endif // CHROME_BROWSER_CHROME_TO_MOBILE_SERVICE_H_ | 237 #endif // CHROME_BROWSER_CHROME_TO_MOBILE_SERVICE_H_ |
| OLD | NEW |