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

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

Issue 9235040: [Sync] Handle errors during first sync gracefully. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for review. Created 8 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
Index: chrome/browser/sync/glue/data_type_manager_impl.cc
diff --git a/chrome/browser/sync/glue/data_type_manager_impl.cc b/chrome/browser/sync/glue/data_type_manager_impl.cc
index a26d3077e4a9d23b5ea4ac04282f418a5a913789..d575596d4abd756a36ddf7d776ec90751e03f604 100644
--- a/chrome/browser/sync/glue/data_type_manager_impl.cc
+++ b/chrome/browser/sync/glue/data_type_manager_impl.cc
@@ -235,6 +235,8 @@ void DataTypeManagerImpl::Restart(sync_api::ConfigureReason reason,
reason,
base::Bind(&DataTypeManagerImpl::DownloadReady,
weak_ptr_factory_.GetWeakPtr()),
+ base::Bind(&DataTypeManagerImpl::OnDownloadRetry,
+ weak_ptr_factory_.GetWeakPtr()),
enable_nigori);
}
@@ -268,6 +270,21 @@ bool DataTypeManagerImpl::ProcessReconfigure() {
return true;
}
+void DataTypeManagerImpl::OnDownloadRetry() {
+ DCHECK_EQ(state_, DOWNLOAD_PENDING);
+
+ // Inform the listeners we are waiting.
+ ConfigureResult result;
+ result.status = DataTypeManager::RETRY;
+
+ // TODO(lipalani): Rename NOTIFICATION_SYNC_CONFIGURE_DONE to
+ // NOTIFICATION_SYNC_CONFIGURE_STATUS.
Andrew T Wilson (Slow) 2012/01/27 18:41:11 Do we have consensus that a rename is what we want
lipalani1 2012/01/27 19:35:26 added a todo with a bug for new notificatin. On 20
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
+ content::Source<DataTypeManager>(this),
+ content::Details<const ConfigureResult>(&result));
+}
+
void DataTypeManagerImpl::DownloadReady(
syncable::ModelTypeSet failed_configuration_types) {
DCHECK_EQ(state_, DOWNLOAD_PENDING);

Powered by Google App Engine
This is Rietveld 408576698