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

Unified Diff: sync/internal_api/test/fake_sync_manager.cc

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/test/fake_sync_manager.cc
diff --git a/sync/internal_api/test/fake_sync_manager.cc b/sync/internal_api/test/fake_sync_manager.cc
index 09ee239b9f77f9a5262e912ee6cdbe3b0b44fd20..d023ebd722ac56a81974401053347dfc97ffda8d 100644
--- a/sync/internal_api/test/fake_sync_manager.cc
+++ b/sync/internal_api/test/fake_sync_manager.cc
@@ -54,25 +54,6 @@ ModelTypeSet FakeSyncManager::GetAndResetEnabledTypes() {
return enabled_types;
}
-void FakeSyncManager::Invalidate(
- const ObjectIdInvalidationMap& invalidation_map) {
- if (!sync_task_runner_->PostTask(
- FROM_HERE,
- base::Bind(&FakeSyncManager::InvalidateOnSyncThread,
- base::Unretained(this), invalidation_map))) {
- NOTREACHED();
- }
-}
-
-void FakeSyncManager::UpdateInvalidatorState(InvalidatorState state) {
- if (!sync_task_runner_->PostTask(
- FROM_HERE,
- base::Bind(&FakeSyncManager::UpdateInvalidatorStateOnSyncThread,
- base::Unretained(this), state))) {
- NOTREACHED();
- }
-}
-
void FakeSyncManager::WaitForSyncThread() {
// Post a task to |sync_task_runner_| and block until it runs.
base::RunLoop run_loop;
@@ -96,7 +77,6 @@ void FakeSyncManager::Init(
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,
@@ -153,31 +133,6 @@ void FakeSyncManager::UpdateCredentials(const SyncCredentials& credentials) {
NOTIMPLEMENTED();
}
-void FakeSyncManager::UpdateEnabledTypes(ModelTypeSet types) {
- enabled_types_ = types;
-}
-
-void FakeSyncManager::RegisterInvalidationHandler(
- InvalidationHandler* handler) {
- registrar_.RegisterHandler(handler);
-}
-
-void FakeSyncManager::UpdateRegisteredInvalidationIds(
- InvalidationHandler* handler,
- const ObjectIdSet& ids) {
- registrar_.UpdateRegisteredIds(handler, ids);
-}
-
-void FakeSyncManager::UnregisterInvalidationHandler(
- InvalidationHandler* handler) {
- registrar_.UnregisterHandler(handler);
-}
-
-void FakeSyncManager::AcknowledgeInvalidation(const invalidation::ObjectId& id,
- const AckHandle& ack_handle) {
- // Do nothing.
-}
-
void FakeSyncManager::StartSyncingNormally(
const ModelSafeRoutingInfo& routing_info) {
// Do nothing.
@@ -190,9 +145,9 @@ void FakeSyncManager::ConfigureSyncer(
const ModelSafeRoutingInfo& new_routing_info,
const base::Closure& ready_task,
const base::Closure& retry_task) {
- ModelTypeSet enabled_types = GetRoutingInfoTypes(new_routing_info);
+ enabled_types_ = GetRoutingInfoTypes(new_routing_info);
ModelTypeSet disabled_types = Difference(
- ModelTypeSet::All(), enabled_types);
+ ModelTypeSet::All(), enabled_types_);
ModelTypeSet success_types = types_to_config;
success_types.RemoveAll(configure_fail_types_);
@@ -280,20 +235,17 @@ void FakeSyncManager::RefreshTypes(ModelTypeSet types) {
last_refresh_request_types_ = types;
}
-void FakeSyncManager::InvalidateOnSyncThread(
- const ObjectIdInvalidationMap& invalidation_map) {
- DCHECK(sync_task_runner_->RunsTasksOnCurrentThread());
- registrar_.DispatchInvalidationsToHandlers(invalidation_map);
-}
-
-void FakeSyncManager::UpdateInvalidatorStateOnSyncThread(
- InvalidatorState state) {
- DCHECK(sync_task_runner_->RunsTasksOnCurrentThread());
- registrar_.UpdateInvalidatorState(state);
+void FakeSyncManager::Invalidate(
+ const ObjectIdInvalidationMap& invalidation_map) {
+ // Do nothing.
}
ModelTypeSet FakeSyncManager::GetLastRefreshRequestTypes() {
return last_refresh_request_types_;
}
+void FakeSyncManager::UpdateInvalidatorState(InvalidatorState state) {
+ // Do nothing.
+}
+
} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698