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

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: Upload before commit. 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..0661f2639d29167f72278456699e11ffa9f58bbe 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): Add a new NOTIFICATION_SYNC_CONFIGURE_RETRY.
+ // crbug.com/111676.
+ 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);
« no previous file with comments | « chrome/browser/sync/glue/data_type_manager_impl.h ('k') | chrome/browser/sync/glue/data_type_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698