summaryrefslogtreecommitdiff
path: root/chrome/browser/sync/profile_sync_service.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2013-07-10 11:40:50 +0100
committerBen Murdoch <benm@google.com>2013-07-10 11:40:50 +0100
commiteb525c5499e34cc9c4b825d6d9e75bb07cc06ace (patch)
treed908ce4bfe1717d2cd53f41327d8b9ba8304355f /chrome/browser/sync/profile_sync_service.h
parent3c54152607de4272b3da0c146b71dcba8a0e5610 (diff)
downloadchromium_org-eb525c5499e34cc9c4b825d6d9e75bb07cc06ace.tar.gz
Merge from Chromium at DEPS revision r210036
This commit was generated by merge_to_master.py. Change-Id: Ib0e33a83ad5dfa541481e83d7acfc6970e68f471
Diffstat (limited to 'chrome/browser/sync/profile_sync_service.h')
-rw-r--r--chrome/browser/sync/profile_sync_service.h59
1 files changed, 4 insertions, 55 deletions
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index 6dd6797b07..18dc12930e 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -17,10 +17,8 @@
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "base/strings/string16.h"
-#include "base/time.h"
-#include "base/timer.h"
-#include "chrome/browser/invalidation/invalidation_frontend.h"
-#include "chrome/browser/invalidation/invalidator_storage.h"
+#include "base/time/time.h"
+#include "base/timer/timer.h"
#include "chrome/browser/signin/oauth2_token_service.h"
#include "chrome/browser/signin/signin_global_error.h"
#include "chrome/browser/sync/backend_unrecoverable_error_handler.h"
@@ -38,7 +36,6 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
#include "google_apis/gaia/google_service_auth_error.h"
-#include "googleurl/src/gurl.h"
#include "net/base/backoff_entry.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
@@ -46,6 +43,7 @@
#include "sync/internal_api/public/util/experiments.h"
#include "sync/internal_api/public/util/unrecoverable_error_handler.h"
#include "sync/js/sync_js_controller.h"
+#include "url/gurl.h"
class Profile;
class ProfileSyncComponentsFactory;
@@ -65,7 +63,6 @@ namespace sessions { class SyncSessionSnapshot; }
namespace syncer {
class BaseTransaction;
-class InvalidatorRegistrar;
struct SyncCredentials;
struct UserShare;
}
@@ -165,7 +162,6 @@ class ProfileSyncService : public ProfileSyncServiceBase,
public syncer::UnrecoverableErrorHandler,
public content::NotificationObserver,
public BrowserContextKeyedService,
- public invalidation::InvalidationFrontend,
public browser_sync::DataTypeEncryptionHandler,
public OAuth2TokenService::Consumer {
public:
@@ -288,12 +284,6 @@ class ProfileSyncService : public ProfileSyncServiceBase,
// Disables sync for user. Use ShowLoginDialog to enable.
virtual void DisableForUser();
- // syncer::InvalidationHandler implementation (via SyncFrontend).
- virtual void OnInvalidatorStateChange(
- syncer::InvalidatorState state) OVERRIDE;
- virtual void OnIncomingInvalidation(
- const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE;
-
// SyncFrontend implementation.
virtual void OnBackendInitialized(
const syncer::WeakHandle<syncer::JsBackend>& js_backend,
@@ -600,21 +590,6 @@ class ProfileSyncService : public ProfileSyncServiceBase,
// The set of currently enabled sync experiments.
const syncer::Experiments& current_experiments() const;
- // InvalidationFrontend implementation. It is an error to have
- // registered handlers when Shutdown() is called.
- virtual void RegisterInvalidationHandler(
- syncer::InvalidationHandler* handler) OVERRIDE;
- virtual void UpdateRegisteredInvalidationIds(
- syncer::InvalidationHandler* handler,
- const syncer::ObjectIdSet& ids) OVERRIDE;
- virtual void UnregisterInvalidationHandler(
- syncer::InvalidationHandler* handler) OVERRIDE;
- virtual void AcknowledgeInvalidation(
- const invalidation::ObjectId& id,
- const syncer::AckHandle& ack_handle) OVERRIDE;
-
- virtual syncer::InvalidatorState GetInvalidatorState() const OVERRIDE;
-
// OAuth2TokenService::Consumer implementation
virtual void OnGetTokenSuccess(
const OAuth2TokenService::Request* request,
@@ -628,11 +603,6 @@ class ProfileSyncService : public ProfileSyncServiceBase,
// once (before this object is destroyed).
virtual void Shutdown() OVERRIDE;
- // Simulate an incoming notification for the given id and payload.
- void EmitInvalidationForTest(
- const invalidation::ObjectId& id,
- const std::string& payload);
-
// Called when a datatype (SyncableService) has a need for sync to start
// ASAP, presumably because a local change event has occurred but we're
// still in deferred start mode, meaning the SyncableService hasn't been
@@ -703,8 +673,6 @@ class ProfileSyncService : public ProfileSyncServiceBase,
ERROR_REASON_ACTIONABLE_ERROR,
ERROR_REASON_LIMIT
};
- typedef std::vector<std::pair<invalidation::ObjectId,
- syncer::AckHandle> > AckHandleReplayQueue;
friend class ProfileSyncServicePasswordTest;
friend class SyncTest;
friend class TestProfileSyncService;
@@ -751,6 +719,7 @@ class ProfileSyncService : public ProfileSyncServiceBase,
void UpdateLastSyncedTime();
void NotifyObservers();
+ void NotifySyncCycleCompleted();
void ClearStaleErrors();
@@ -800,11 +769,6 @@ class ProfileSyncService : public ProfileSyncServiceBase,
bool delete_sync_database,
UnrecoverableErrorReason reason);
- // Must be called every time |backend_initialized_| or
- // |invalidator_state_| is changed (but only if
- // |invalidator_registrar_| is not NULL).
- void UpdateInvalidatorRegistrarState();
-
// Returns the username (in form of an email address) that should be used in
// the credentials.
std::string GetEffectiveUsername();
@@ -819,9 +783,6 @@ class ProfileSyncService : public ProfileSyncServiceBase,
// preferences.
browser_sync::SyncPrefs sync_prefs_;
- // TODO(tim): Move this to InvalidationService, once it exists. Bug 124137.
- invalidation::InvalidatorStorage invalidator_storage_;
-
// TODO(ncarter): Put this in a profile, once there is UI for it.
// This specifies where to find the sync server.
GURL sync_service_url_;
@@ -942,18 +903,6 @@ class ProfileSyncService : public ProfileSyncServiceBase,
// Factory the backend will use to build the SyncManager.
syncer::SyncManagerFactory sync_manager_factory_;
- // Holds the current invalidator state as updated by
- // OnInvalidatorStateChange(). Note that this is different from the
- // state known by |invalidator_registrar_| (See
- // UpdateInvalidatorState()).
- syncer::InvalidatorState invalidator_state_;
-
- // Dispatches invalidations to handlers. Set in Initialize() and
- // unset in Shutdown().
- scoped_ptr<syncer::InvalidatorRegistrar> invalidator_registrar_;
- // Queues any acknowledgements received while the backend is uninitialized.
- AckHandleReplayQueue ack_replay_queue_;
-
// Sync's internal debug info listener. Used to record datatype configuration
// and association information.
syncer::WeakHandle<syncer::DataTypeDebugInfoListener> debug_info_listener_;