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

Unified Diff: chrome/browser/sync/glue/bridged_invalidator.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/bridged_invalidator.h
diff --git a/chrome/browser/sync/glue/bridged_invalidator.h b/chrome/browser/sync/glue/bridged_invalidator.h
index 018e876b96d38407b46994d393a7d13a270b4036..63d0ea46b46a21aee1ac52b5b99f66fa9a50f6f2 100644
--- a/chrome/browser/sync/glue/bridged_invalidator.h
+++ b/chrome/browser/sync/glue/bridged_invalidator.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_SYNC_GLUE_BRIDGED_INVALIDATOR_H_
#define CHROME_BROWSER_SYNC_GLUE_BRIDGED_INVALIDATOR_H_
+#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "sync/notifier/invalidator.h"
@@ -21,10 +22,12 @@ class ChromeSyncNotificationBridge;
// and unregistered with the ChromeSyncNotificationBridge, respectively.
class BridgedInvalidator : public syncer::Invalidator {
public:
- // Does not take ownership of |bridge|. Takes ownership of |delegate|.
- // |delegate| may be NULL.
+ // Does not take ownership of |bridge|. Takes ownership of
+ // |delegate|. |delegate| may be NULL. |default_invalidator_state|
+ // is used by GetInvalidatorState() if |delegate| is NULL.
BridgedInvalidator(ChromeSyncNotificationBridge* bridge,
- syncer::Invalidator* delegate);
+ syncer::Invalidator* delegate,
+ syncer::InvalidatorState default_invalidator_state);
virtual ~BridgedInvalidator();
// Invalidator implementation. Passes through all calls to the delegate.
@@ -34,19 +37,24 @@ class BridgedInvalidator : public syncer::Invalidator {
virtual void UpdateRegisteredIds(syncer::InvalidationHandler * handler,
const syncer::ObjectIdSet& ids) OVERRIDE;
virtual void UnregisterHandler(syncer::InvalidationHandler* handler) OVERRIDE;
+ virtual syncer::InvalidatorState GetInvalidatorState() const OVERRIDE;
virtual void SetUniqueId(const std::string& unique_id) OVERRIDE;
virtual void SetStateDeprecated(const std::string& state) OVERRIDE;
virtual void UpdateCredentials(
const std::string& email, const std::string& token) OVERRIDE;
- virtual void SendNotification(
+ virtual void SendInvalidation(
const syncer::ObjectIdStateMap& id_state_map) OVERRIDE;
private:
// The notification bridge that we register the observers with.
- ChromeSyncNotificationBridge* bridge_;
+ ChromeSyncNotificationBridge* const bridge_;
// The delegate we are wrapping.
- scoped_ptr<syncer::Invalidator> delegate_;
+ const scoped_ptr<syncer::Invalidator> delegate_;
+
+ const syncer::InvalidatorState default_invalidator_state_;
+
+ DISALLOW_COPY_AND_ASSIGN(BridgedInvalidator);
};
} // namespace browser_sync

Powered by Google App Engine
This is Rietveld 408576698