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

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

Issue 12022041: Separate local and remote sync invalidations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 11 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/chrome_sync_notification_bridge.h
diff --git a/chrome/browser/sync/glue/chrome_sync_notification_bridge.h b/chrome/browser/sync/glue/chrome_sync_notification_bridge.h
deleted file mode 100644
index 788303e7e538ee7d9a0dbf362cf7258d2343edc6..0000000000000000000000000000000000000000
--- a/chrome/browser/sync/glue/chrome_sync_notification_bridge.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2012 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_CHROME_SYNC_NOTIFICATION_BRIDGE_H_
-#define CHROME_BROWSER_SYNC_GLUE_CHROME_SYNC_NOTIFICATION_BRIDGE_H_
-
-#include "base/compiler_specific.h"
-#include "base/memory/ref_counted.h"
-#include "base/sequenced_task_runner.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
-#include "sync/notifier/invalidation_util.h"
-
-class Profile;
-
-namespace syncer {
-class InvalidationHandler;
-} // namespace
-
-namespace browser_sync {
-
-// A bridge that converts Chrome events on the UI thread to sync
-// notifications on the sync task runner.
-//
-// Listens to NOTIFICATION_SYNC_REFRESH_LOCAL and
-// NOTIFICATION_SYNC_REFRESH_REMOTE (on the UI thread) and triggers
-// each observer's OnIncomingNotification method on these
-// notifications (on the sync task runner).
-class ChromeSyncNotificationBridge : public content::NotificationObserver {
- public:
- // Must be created and destroyed on the UI thread.
- ChromeSyncNotificationBridge(
- const Profile* profile,
- const scoped_refptr<base::SequencedTaskRunner>& sync_task_runner);
- virtual ~ChromeSyncNotificationBridge();
-
- // Must be called on the UI thread while the sync task runner is still
- // around. No other member functions on the sync thread may be called after
- // this is called.
- void StopForShutdown();
-
- // Must be called on the sync task runner.
- void RegisterHandler(syncer::InvalidationHandler* handler);
- void UpdateRegisteredIds(syncer::InvalidationHandler* handler,
- const syncer::ObjectIdSet& ids);
- void UnregisterHandler(syncer::InvalidationHandler* handler);
-
- bool IsHandlerRegisteredForTest(
- syncer::InvalidationHandler* handler) const;
- syncer::ObjectIdSet GetRegisteredIdsForTest(
- syncer::InvalidationHandler* handler) const;
-
- // NotificationObserver implementation. Called on UI thread.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
- private:
- // Inner class to hold all the bits used on |sync_task_runner_|.
- class Core;
-
- const scoped_refptr<base::SequencedTaskRunner> sync_task_runner_;
-
- // Created on the UI thread, used only on |sync_task_runner_|.
- const scoped_refptr<Core> core_;
-
- // Used only on the UI thread.
- content::NotificationRegistrar registrar_;
-};
-
-} // namespace browser_sync
-
-#endif // CHROME_BROWSER_SYNC_GLUE_CHROME_SYNC_NOTIFICATION_BRIDGE_H_
« no previous file with comments | « chrome/browser/sync/glue/bridged_invalidator_unittest.cc ('k') | chrome/browser/sync/glue/chrome_sync_notification_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698