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

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

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 | « sync/internal_api/sync_manager_impl_unittest.cc ('k') | sync/notifier/fake_invalidator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3a9becaa24bcd2c6aa7ddba70403ce2e498e6706..7a6d6a427a0cc309895e0a212a82b06a911a55f6 100644
--- a/sync/internal_api/test/fake_sync_manager.cc
+++ b/sync/internal_api/test/fake_sync_manager.cc
@@ -61,25 +61,6 @@ ConfigureReason FakeSyncManager::GetAndResetConfigureReason() {
return reason;
}
-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;
@@ -103,7 +84,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,
@@ -161,31 +141,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.
@@ -201,7 +156,7 @@ void FakeSyncManager::ConfigureSyncer(
const base::Closure& ready_task,
const base::Closure& retry_task) {
last_configure_reason_ = reason;
- ModelTypeSet enabled_types = GetRoutingInfoTypes(new_routing_info);
+ enabled_types_ = GetRoutingInfoTypes(new_routing_info);
ModelTypeSet success_types = to_download;
success_types.RemoveAll(configure_fail_types_);
@@ -291,20 +246,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::OnIncomingInvalidation(
+ const ObjectIdInvalidationMap& invalidation_map) {
+ // Do nothing.
}
ModelTypeSet FakeSyncManager::GetLastRefreshRequestTypes() {
return last_refresh_request_types_;
}
+void FakeSyncManager::OnInvalidatorStateChange(InvalidatorState state) {
+ // Do nothing.
+}
+
} // namespace syncer
« no previous file with comments | « sync/internal_api/sync_manager_impl_unittest.cc ('k') | sync/notifier/fake_invalidator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698