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

Unified Diff: sync/internal_api/public/test/fake_sync_manager.h

Issue 10824252: Revert 150990 - [Sync] Avoid unregistering object IDs on shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « sync/internal_api/public/sync_manager.h ('k') | sync/internal_api/sync_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/public/test/fake_sync_manager.h
===================================================================
--- sync/internal_api/public/test/fake_sync_manager.h (revision 150991)
+++ sync/internal_api/public/test/fake_sync_manager.h (working copy)
@@ -10,7 +10,7 @@
#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
#include "sync/internal_api/public/sync_manager.h"
-#include "sync/notifier/sync_notifier_registrar.h"
+#include "sync/notifier/sync_notifier_helper.h"
namespace base {
class SequencedTaskRunner;
@@ -20,23 +20,25 @@
class FakeSyncManager : public SyncManager {
public:
- // |initial_sync_ended_types|: The set of types that have initial_sync_ended
- // set to true. This value will be used by InitialSyncEndedTypes() until the
- // next configuration is performed.
- //
- // |progress_marker_types|: The set of types that have valid progress
- // markers. This will be used by GetTypesWithEmptyProgressMarkerToken() until
- // the next configuration is performed.
- //
- // |configure_fail_types|: The set of types that will fail
- // configuration. Once ConfigureSyncer is called, the
- // |initial_sync_ended_types_| and |progress_marker_types_| will be updated
- // to include those types that didn't fail.
- FakeSyncManager(ModelTypeSet initial_sync_ended_types,
- ModelTypeSet progress_marker_types,
- ModelTypeSet configure_fail_types);
+ explicit FakeSyncManager();
virtual ~FakeSyncManager();
+ // The set of types that have initial_sync_ended set to true. This value will
+ // be used by InitialSyncEndedTypes() until the next configuration is
+ // performed.
+ void set_initial_sync_ended_types(ModelTypeSet types);
+
+ // The set of types that have valid progress markers. This will be used by
+ // GetTypesWithEmptyProgressMarkerToken() until the next configuration is
+ // performed.
+ void set_progress_marker_types(ModelTypeSet types);
+
+ // The set of types that will fail configuration. Once ConfigureSyncer is
+ // called, the |initial_sync_ended_types_| and
+ // |progress_marker_types_| will be updated to include those types
+ // that didn't fail.
+ void set_configure_fail_types(ModelTypeSet types);
+
// Returns those types that have been cleaned (purged from the directory)
// since the last call to GetAndResetCleanedTypes(), or since startup if never
// called.
@@ -61,9 +63,6 @@
// Posts a method to disable notifications on the sync thread.
void DisableNotifications(NotificationsDisabledReason reason);
- // Block until the sync thread has finished processing any pending messages.
- void WaitForSyncThread();
-
// SyncManager implementation.
// Note: we treat whatever message loop this is called from as the sync
// loop for purposes of callbacks.
@@ -95,13 +94,9 @@
virtual bool PurgePartiallySyncedTypes() OVERRIDE;
virtual void UpdateCredentials(const SyncCredentials& credentials) OVERRIDE;
virtual void UpdateEnabledTypes(const ModelTypeSet& types) OVERRIDE;
- virtual void RegisterInvalidationHandler(
- SyncNotifierObserver* handler) OVERRIDE;
virtual void UpdateRegisteredInvalidationIds(
SyncNotifierObserver* handler,
const ObjectIdSet& ids) OVERRIDE;
- virtual void UnregisterInvalidationHandler(
- SyncNotifierObserver* handler) OVERRIDE;
virtual void StartSyncingNormally(
const ModelSafeRoutingInfo& routing_info) OVERRIDE;
virtual void SetEncryptionPassphrase(const std::string& passphrase,
@@ -155,7 +150,7 @@
ModelTypeSet enabled_types_;
// Faked notifier state.
- SyncNotifierRegistrar registrar_;
+ SyncNotifierHelper notifier_helper_;
DISALLOW_COPY_AND_ASSIGN(FakeSyncManager);
};
« no previous file with comments | « sync/internal_api/public/sync_manager.h ('k') | sync/internal_api/sync_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698