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

Unified Diff: chrome/browser/chrome_to_mobile_service.h

Issue 10834203: Integrate invalidation API into ChromeToMobileService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge; consume ipc::invalidation::ObjectSource::CHROME_COMPONENTS. Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_to_mobile_service.h
diff --git a/chrome/browser/chrome_to_mobile_service.h b/chrome/browser/chrome_to_mobile_service.h
index bf608c0aa13844eeabcf8d3ca248ea5b31c1fda8..f9c7557f6100d353b0162923159fb07506369f22 100644
--- a/chrome/browser/chrome_to_mobile_service.h
+++ b/chrome/browser/chrome_to_mobile_service.h
@@ -23,6 +23,10 @@
#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
#include "net/url_request/url_fetcher_delegate.h"
+#include "sync/notifier/chrome_invalidation_client.h"
akalin 2012/08/08 23:06:27 chrome_invalidation_client shouldn't be included.
msw 2012/08/10 22:05:05 Done.
+#include "sync/notifier/invalidation_util.h"
+#include "sync/notifier/notifications_disabled_reason.h"
+#include "sync/notifier/sync_notifier_observer.h"
class OAuth2AccessTokenFetcher;
class Browser;
@@ -40,7 +44,8 @@ class URLFetcher;
class ChromeToMobileService : public ProfileKeyedService,
public net::URLFetcherDelegate,
public content::NotificationObserver,
- public OAuth2AccessTokenConsumer {
+ public OAuth2AccessTokenConsumer,
+ public syncer::SyncNotifierObserver {
public:
class Observer {
public:
@@ -153,6 +158,14 @@ class ChromeToMobileService : public ProfileKeyedService,
const base::Time& expiration_time) OVERRIDE;
virtual void OnGetTokenFailure(const GoogleServiceAuthError& error) OVERRIDE;
+ // syncer::SyncNotifierObserver implementation.
+ virtual void OnNotificationsEnabled() OVERRIDE;
+ virtual void OnNotificationsDisabled(
+ syncer::NotificationsDisabledReason reason) OVERRIDE;
+ virtual void OnIncomingNotification(
+ const syncer::ObjectIdPayloadMap& id_payloads,
+ syncer::IncomingNotificationSource source) OVERRIDE;
+
private:
friend class MockChromeToMobileService;
@@ -190,6 +203,11 @@ class ChromeToMobileService : public ProfileKeyedService,
Profile* profile_;
+ // TODO(msw): The Sync object id set...
+ invalidation::ObjectId mobile_list_id_;
+ syncer::ObjectIdSet sync_objects_;
+ bool sync_invalidation_enabled_;
+
// Used to recieve TokenService notifications for GaiaOAuth2LoginRefreshToken.
content::NotificationRegistrar registrar_;

Powered by Google App Engine
This is Rietveld 408576698