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

Unified Diff: sync/internal_api/public/sync_manager.h

Issue 15580002: Make use of InvalidationService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | sync/internal_api/public/test/fake_sync_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/public/sync_manager.h
diff --git a/sync/internal_api/public/sync_manager.h b/sync/internal_api/public/sync_manager.h
index b3f03b0c3883bba5a3d3e1d0ce9b56d4a2947163..bc6a1379699bde440a8f4da733feceaa5bffb199 100644
--- a/sync/internal_api/public/sync_manager.h
+++ b/sync/internal_api/public/sync_manager.h
@@ -23,7 +23,7 @@
#include "sync/internal_api/public/sync_encryption_handler.h"
#include "sync/internal_api/public/util/report_unrecoverable_error_function.h"
#include "sync/internal_api/public/util/weak_handle.h"
-#include "sync/notifier/invalidation_util.h"
+#include "sync/notifier/invalidation_handler.h"
#include "sync/protocol/sync_protocol_error.h"
namespace sync_pb {
@@ -39,8 +39,6 @@ struct Experiments;
class ExtensionsActivityMonitor;
class HttpPostProviderFactory;
class InternalComponentsFactory;
-class InvalidationHandler;
-class Invalidator;
class JsBackend;
class JsEventHandler;
class SyncEncryptionHandler;
@@ -75,7 +73,7 @@ struct SyncCredentials {
//
// Unless stated otherwise, all methods of SyncManager should be called on the
// same thread.
-class SYNC_EXPORT SyncManager {
+class SYNC_EXPORT SyncManager : public syncer::InvalidationHandler {
public:
// An interface the embedding application implements to be notified
// on change events. Note that these methods may be called on *any*
@@ -315,7 +313,6 @@ class SYNC_EXPORT SyncManager {
ExtensionsActivityMonitor* extensions_activity_monitor,
ChangeDelegate* change_delegate,
const SyncCredentials& credentials,
- scoped_ptr<Invalidator> invalidator,
const std::string& invalidator_client_id,
const std::string& restored_key_for_bootstrapping,
const std::string& restored_keystore_key_for_bootstrapping,
@@ -344,27 +341,6 @@ class SYNC_EXPORT SyncManager {
// Update tokens that we're using in Sync. Email must stay the same.
virtual void UpdateCredentials(const SyncCredentials& credentials) = 0;
- // Called when the user disables or enables a sync type.
- virtual void UpdateEnabledTypes(ModelTypeSet enabled_types) = 0;
-
- // Forwards to the underlying invalidator (see comments in invalidator.h).
- virtual void RegisterInvalidationHandler(
- InvalidationHandler* handler) = 0;
-
- // Forwards to the underlying notifier (see comments in invalidator.h).
- virtual void UpdateRegisteredInvalidationIds(
- InvalidationHandler* handler,
- const ObjectIdSet& ids) = 0;
-
- // Forwards to the underlying notifier (see comments in invalidator.h).
- virtual void UnregisterInvalidationHandler(
- InvalidationHandler* handler) = 0;
-
- // Forwards to the underlying notifier (see comments in invalidator.h).
- virtual void AcknowledgeInvalidation(
- const invalidation::ObjectId& id,
- const syncer::AckHandle& ack_handle) = 0;
-
// Put the syncer in normal mode ready to perform nudges and polls.
virtual void StartSyncingNormally(
const ModelSafeRoutingInfo& routing_info) = 0;
@@ -392,6 +368,13 @@ class SYNC_EXPORT SyncManager {
const base::Closure& ready_task,
const base::Closure& retry_task) = 0;
+ // Inform the syncer of a change in the invalidator's state.
+ virtual void OnInvalidatorStateChange(InvalidatorState state) = 0;
+
+ // Inform the syncer that its cached information about a type is obsolete.
+ virtual void OnIncomingInvalidation(
+ const ObjectIdInvalidationMap& invalidation_map) = 0;
+
// Adds a listener to be notified of sync events.
// NOTE: It is OK (in fact, it's probably a good idea) to call this before
// having received OnInitializationCompleted.
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | sync/internal_api/public/test/fake_sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698