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

Unified Diff: chrome/browser/sync/glue/dummy_invalidator.h

Issue 15780020: Setup Sync to use OAuth token for managed users. (Closed) Base URL: http://git.chromium.org/chromium/src.git@issue226464a
Patch Set: fix Created 7 years, 6 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/dummy_invalidator.h
diff --git a/chrome/browser/sync/glue/dummy_invalidator.h b/chrome/browser/sync/glue/dummy_invalidator.h
new file mode 100644
index 0000000000000000000000000000000000000000..634a1f0ca351a5d05a956cc76695c448fdbe327f
--- /dev/null
+++ b/chrome/browser/sync/glue/dummy_invalidator.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SYNC_GLUE_DUMMY_INVALIDATOR_H_
+#define CHROME_BROWSER_SYNC_GLUE_DUMMY_INVALIDATOR_H_
+
+#include "sync/notifier/invalidator.h"
+
+// A fake invalidator that does nothing, and stays in a "transient" error state.
+// This is useful for cases where we know that invalidations won't work, but
+// still want to keep Sync running without them
+class DummyInvalidator : public syncer::Invalidator {
+ public:
+ DummyInvalidator();
+ virtual ~DummyInvalidator();
+
+ virtual void RegisterHandler(syncer::InvalidationHandler* handler) OVERRIDE;
+ virtual void UpdateRegisteredIds(syncer::InvalidationHandler* handler,
+ const syncer::ObjectIdSet& ids) OVERRIDE;
+ virtual void UnregisterHandler(syncer::InvalidationHandler* handler) OVERRIDE;
+ virtual void Acknowledge(const invalidation::ObjectId& id,
+ const syncer::AckHandle& ack_handle) OVERRIDE;
+ virtual syncer::InvalidatorState GetInvalidatorState() const OVERRIDE;
+ virtual void UpdateCredentials(
+ const std::string& email, const std::string& token) OVERRIDE;
+ virtual void SendInvalidation(
+ const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DummyInvalidator);
+};
+
+#endif // CHROME_BROWSER_SYNC_GLUE_DUMMY_INVALIDATOR_H_

Powered by Google App Engine
This is Rietveld 408576698