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

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..d33568fee4ff7d66f1e831e17e6e41fc4a282aef 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,18 @@ 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;
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
Andrew T Wilson (Slow) 2012/01/27 00:19:03 See my previous comment - perhaps there's a better
lipalani1 2012/01/27 02:54:29 Answered above. On 2012/01/27 00:19:03, Andrew T W
+ 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