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

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

Issue 15701022: [Sync] Add support for sync Persistence Errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move bookmark change into separate patch Created 7 years, 6 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/ui_data_type_controller.cc
diff --git a/chrome/browser/sync/glue/ui_data_type_controller.cc b/chrome/browser/sync/glue/ui_data_type_controller.cc
index 830999e97770d657a93e4b22454462d6eee0be57..1ed6b863b6d895841b93d520c72221d1a715b98c 100644
--- a/chrome/browser/sync/glue/ui_data_type_controller.cc
+++ b/chrome/browser/sync/glue/ui_data_type_controller.cc
@@ -55,7 +55,9 @@ void UIDataTypeController::LoadModels(
DCHECK(!model_load_callback.is_null());
DCHECK(syncer::IsRealDataType(type_));
if (state_ != NOT_RUNNING) {
- model_load_callback.Run(type(), syncer::SyncError(FROM_HERE,
+ model_load_callback.Run(type(),
+ syncer::SyncError(FROM_HERE,
+ syncer::SyncError::DATATYPE_ERROR,
"Model already loaded",
type()));
return;
@@ -131,7 +133,10 @@ void UIDataTypeController::Associate() {
type(),
weak_ptr_factory.GetWeakPtr());
if (!local_service_.get()) {
- syncer::SyncError error(FROM_HERE, "Failed to connect to syncer.", type());
+ syncer::SyncError error(FROM_HERE,
+ syncer::SyncError::DATATYPE_ERROR,
+ "Failed to connect to syncer.",
+ type());
local_merge_result.set_error(error);
StartDone(ASSOCIATION_FAILED,
local_merge_result,
@@ -149,7 +154,10 @@ void UIDataTypeController::Associate() {
bool sync_has_nodes = false;
if (!shared_change_processor_->SyncModelHasUserCreatedNodes(
&sync_has_nodes)) {
- syncer::SyncError error(FROM_HERE, "Failed to load sync nodes", type());
+ syncer::SyncError error(FROM_HERE,
+ syncer::SyncError::UNRECOVERABLE_ERROR,
+ "Failed to load sync nodes",
+ type());
local_merge_result.set_error(error);
StartDone(UNRECOVERABLE_ERROR,
local_merge_result,
@@ -207,7 +215,9 @@ void UIDataTypeController::AbortModelLoad() {
ModelLoadCallback model_load_callback = model_load_callback_;
model_load_callback_.Reset();
- model_load_callback.Run(type(), syncer::SyncError(FROM_HERE,
+ model_load_callback.Run(type(),
+ syncer::SyncError(FROM_HERE,
+ syncer::SyncError::DATATYPE_ERROR,
"Aborted",
type()));
}
« no previous file with comments | « chrome/browser/sync/glue/shared_change_processor.cc ('k') | chrome/browser/sync/glue/ui_data_type_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698