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

Unified Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 7655055: [Sync] Make BackendMigrator not wait for full sync cycles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 9 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
Index: chrome/browser/sync/glue/sync_backend_host.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index efa717b1d97cdac7119bb3f4691b24a8436caecf..79b5ddf6e418be4a62a617e4ed50ce3bb407f5eb 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -66,6 +66,7 @@ SyncBackendHost::SyncBackendHost(Profile* profile)
sync_thread_("Chrome_SyncThread"),
frontend_loop_(MessageLoop::current()),
profile_(profile),
+ name_(profile_->GetDebugName()),
sync_notifier_factory_(webkit_glue::GetUserAgent(GURL()),
profile_->GetRequestContext(),
*CommandLine::ForCurrentProcess()),
@@ -320,6 +321,12 @@ void SyncBackendHost::GetPendingConfigModeState(
routing_info->erase(*it);
}
+ VLOG(1) << "Adding types " << syncable::ModelTypeSetToString(types_to_add)
+ << " and removing types "
+ << syncable::ModelTypeSetToString(types_to_remove)
+ << " to get new routing info "
+ << ModelSafeRoutingInfoToString(*routing_info);
+
state->ready_task = ready_task;
state->types_to_add = types_to_add;
state->reason = reason;
@@ -409,8 +416,7 @@ void SyncBackendHost::FinishConfigureDataTypesOnFrontendLoop() {
// If we've added types, we always want to request a nudge/config (even if
// the initial sync is ended), in case we could not decrypt the data.
if (pending_config_mode_state_->added_types.empty()) {
- VLOG(1) << "SyncBackendHost(" << this << "): No new types added. "
- << "Calling ready_task directly";
+ VLOG(1) << name_ << ": No new types added; calling ready_task directly";
// No new types - just notify the caller that the types are available.
pending_config_mode_state_->ready_task.Run(true);
} else {
@@ -422,8 +428,8 @@ void SyncBackendHost::FinishConfigureDataTypesOnFrontendLoop() {
if (IsNigoriEnabled()) {
types_to_config.insert(syncable::NIGORI);
}
- VLOG(1) << "SyncBackendHost(" << this << "):New Types added. "
- << "Calling DoRequestConfig";
+ VLOG(1) << name_ << ": types " << ModelTypeSetToString(types_to_config)
+ << "added; calling DoRequestConfig";
sync_thread_.message_loop()->PostTask(FROM_HERE,
NewRunnableMethod(core_.get(),
&SyncBackendHost::Core::DoRequestConfig,
@@ -876,6 +882,11 @@ void SyncBackendHost::Core::HandleSyncCycleCompletedOnFrontendLoop(
DCHECK(
std::includes(state->types_to_add.begin(), state->types_to_add.end(),
state->added_types.begin(), state->added_types.end()));
+ VLOG(1)
+ << "Added types: "
+ << syncable::ModelTypeSetToString(state->added_types)
+ << ", configured types: "
+ << syncable::ModelTypeBitSetToString(snapshot->initial_sync_ended);
syncable::ModelTypeBitSet added_types =
syncable::ModelTypeBitSetFromSet(state->added_types);
bool found_all_added =

Powered by Google App Engine
This is Rietveld 408576698