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

Unified Diff: sync/internal_api/sync_manager_impl.cc

Issue 12092091: Separate sync and invalidation client IDs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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.h ('k') | sync/internal_api/sync_manager_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/sync_manager_impl.cc
diff --git a/sync/internal_api/sync_manager_impl.cc b/sync/internal_api/sync_manager_impl.cc
index 618039c9ec1b5f256411990cedb73fe130b179b2..1e218ecd7ced9ff334272009972be37bd3f010a7 100644
--- a/sync/internal_api/sync_manager_impl.cc
+++ b/sync/internal_api/sync_manager_impl.cc
@@ -342,6 +342,7 @@ void SyncManagerImpl::Init(
SyncManager::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,
scoped_ptr<InternalComponentsFactory> internal_components_factory,
@@ -417,11 +418,12 @@ void SyncManagerImpl::Init(
connection_manager_->set_client_id(directory()->cache_guid());
connection_manager_->AddListener(this);
- // Retrieve and set the sync notifier id.
- std::string unique_id = directory()->cache_guid();
- DVLOG(1) << "Read notification unique ID: " << unique_id;
- allstatus_.SetUniqueId(unique_id);
- invalidator_->SetUniqueId(unique_id);
+ std::string sync_id = directory()->cache_guid();
+ allstatus_.SetSyncId(sync_id);
+ allstatus_.SetInvalidatorClientId(invalidator_client_id);
+
+ DVLOG(1) << "Setting sync client ID: " << sync_id;
+ DVLOG(1) << "Setting invalidator client ID: " << invalidator_client_id;
// Build a SyncSessionContext and store the worker in it.
DVLOG(1) << "Sync is bringing up SyncSessionContext.";
@@ -436,7 +438,8 @@ void SyncManagerImpl::Init(
&throttled_data_type_tracker_,
listeners,
&debug_info_event_listener_,
- &traffic_recorder_).Pass();
+ &traffic_recorder_,
+ invalidator_client_id).Pass();
session_context_->set_account_name(credentials.email);
scheduler_ = internal_components_factory->BuildScheduler(
name_, session_context_.get()).Pass();
« no previous file with comments | « sync/internal_api/sync_manager_impl.h ('k') | sync/internal_api/sync_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698