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

Unified Diff: chrome/browser/sync/profile_sync_service.cc

Issue 7655055: [Sync] Make BackendMigrator not wait for full sync cycles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address more comments 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
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | chrome/browser/sync/profile_sync_service_harness.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service.cc
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 659c3121edf932ac446fa1edcbf2b0626df3d7de..75da4823d5c12fd74dd04ffdda2995a5c5653bb7 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -392,7 +392,7 @@ void ProfileSyncService::InitializeBackend(bool delete_sync_data_folder) {
}
void ProfileSyncService::CreateBackend() {
- backend_.reset(new SyncBackendHost(profile_));
+ backend_.reset(new SyncBackendHost(profile_->GetDebugName(), profile_));
}
bool ProfileSyncService::IsEncryptedDatatypeEnabled() const {
@@ -604,11 +604,11 @@ void ProfileSyncService::OnUnrecoverableError(
wizard_.Step(SyncSetupWizard::FATAL_ERROR);
NotifyObservers();
- LOG(ERROR) << "Unrecoverable error detected -- ProfileSyncService unusable."
- << message;
std::string location;
from_here.Write(true, true, &location);
- LOG(ERROR) << location;
+ LOG(ERROR)
+ << "Unrecoverable error detected at " << location
+ << " -- ProfileSyncService unusable: " << message;
// Shut all data types down.
MessageLoop::current()->PostTask(FROM_HERE,
@@ -1227,7 +1227,9 @@ void ProfileSyncService::ConfigureDataTypeManager() {
// We create the migrator at the same time.
migrator_.reset(
- new browser_sync::BackendMigrator(this, data_type_manager_.get()));
+ new browser_sync::BackendMigrator(
+ profile_->GetDebugName(), GetUserShare(),
+ this, data_type_manager_.get()));
}
syncable::ModelTypeSet types;
@@ -1296,9 +1298,9 @@ void ProfileSyncService::LogUnsyncedItems(int level) const {
<< "initialized";
}
-bool ProfileSyncService::HasPendingBackendMigration() const {
- return migrator_.get() &&
- migrator_->state() != browser_sync::BackendMigrator::IDLE;
+browser_sync::BackendMigrator*
+ ProfileSyncService::GetBackendMigratorForTest() {
+ return migrator_.get();
}
void ProfileSyncService::GetModelSafeRoutingInfo(
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | chrome/browser/sync/profile_sync_service_harness.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698