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

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

Issue 13197004: Draft: InvalidationService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Passes tests Created 7 years, 8 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: 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 2d71466d7ff4784896db0395aeb088579b12a6bd..e9a05c8690d3d287f25997d40a0d6204a68821be 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;
@@ -313,7 +311,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,
@@ -341,27 +338,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;
@@ -385,6 +361,12 @@ 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 UpdateInvalidatorState(InvalidatorState state) = 0;
+
+ // Inform the syncer that its cached information about a type is obsolete.
+ virtual void Invalidate(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.

Powered by Google App Engine
This is Rietveld 408576698