Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Side by Side Diff: chrome/browser/chrome_to_mobile_service.h

Issue 10916131: [Invalidations] Add GetInvalidatorState() to Invalidator{,Frontend} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix android Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chrome_to_mobile_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 virtual void Observe(int type, 148 virtual void Observe(int type,
149 const content::NotificationSource& source, 149 const content::NotificationSource& source,
150 const content::NotificationDetails& details) OVERRIDE; 150 const content::NotificationDetails& details) OVERRIDE;
151 151
152 // OAuth2AccessTokenConsumer methods. 152 // OAuth2AccessTokenConsumer methods.
153 virtual void OnGetTokenSuccess(const std::string& access_token, 153 virtual void OnGetTokenSuccess(const std::string& access_token,
154 const base::Time& expiration_time) OVERRIDE; 154 const base::Time& expiration_time) OVERRIDE;
155 virtual void OnGetTokenFailure(const GoogleServiceAuthError& error) OVERRIDE; 155 virtual void OnGetTokenFailure(const GoogleServiceAuthError& error) OVERRIDE;
156 156
157 // syncer::InvalidationHandler implementation. 157 // syncer::InvalidationHandler implementation.
158 virtual void OnNotificationsEnabled() OVERRIDE; 158 virtual void OnInvalidatorStateChange(
159 virtual void OnNotificationsDisabled( 159 syncer::InvalidatorState state) OVERRIDE;
160 syncer::NotificationsDisabledReason reason) OVERRIDE; 160 virtual void OnIncomingInvalidation(
161 virtual void OnIncomingNotification(
162 const syncer::ObjectIdStateMap& id_state_map, 161 const syncer::ObjectIdStateMap& id_state_map,
163 syncer::IncomingNotificationSource source) OVERRIDE; 162 syncer::IncomingInvalidationSource source) OVERRIDE;
164 163
165 // Expose access token accessors for test purposes. 164 // Expose access token accessors for test purposes.
166 const std::string& GetAccessTokenForTest() const; 165 const std::string& GetAccessTokenForTest() const;
167 void SetAccessTokenForTest(const std::string& access_token); 166 void SetAccessTokenForTest(const std::string& access_token);
168 167
169 private: 168 private:
170 friend class MockChromeToMobileService; 169 friend class MockChromeToMobileService;
171 170
172 // Enable or disable Chrome To Mobile with the browsers' command controllers. 171 // Enable or disable Chrome To Mobile with the browsers' command controllers.
173 // The feature state is automatically derived from internal conditions. 172 // The feature state is automatically derived from internal conditions.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 scoped_ptr<OAuth2AccessTokenFetcher> access_token_fetcher_; 226 scoped_ptr<OAuth2AccessTokenFetcher> access_token_fetcher_;
228 base::OneShotTimer<ChromeToMobileService> auth_retry_timer_; 227 base::OneShotTimer<ChromeToMobileService> auth_retry_timer_;
229 228
230 // A queue of tasks to perform after an access token is lazily initialized. 229 // A queue of tasks to perform after an access token is lazily initialized.
231 std::queue<base::Closure> task_queue_; 230 std::queue<base::Closure> task_queue_;
232 231
233 DISALLOW_COPY_AND_ASSIGN(ChromeToMobileService); 232 DISALLOW_COPY_AND_ASSIGN(ChromeToMobileService);
234 }; 233 };
235 234
236 #endif // CHROME_BROWSER_CHROME_TO_MOBILE_SERVICE_H_ 235 #endif // CHROME_BROWSER_CHROME_TO_MOBILE_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_to_mobile_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698