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

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

Issue 2002012: sync: Add location info to unrecoverable error. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Add error handler back to bookmark model associator Created 10 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/theme_change_processor.cc
===================================================================
--- chrome/browser/sync/glue/theme_change_processor.cc (revision 48898)
+++ chrome/browser/sync/glue/theme_change_processor.cc (working copy)
@@ -112,9 +112,9 @@
sync_api::WriteNode node(&trans);
if (!node.InitByClientTagLookup(syncable::THEMES,
kCurrentThemeClientTag)) {
- LOG(ERROR) << "Could not create node with client tag: "
- << kCurrentThemeClientTag;
- error_handler()->OnUnrecoverableError();
+ std::string err = "Could not create node with client tag: ";
+ error_handler()->OnUnrecoverableError(FROM_HERE,
+ err + kCurrentThemeClientTag);
return;
}
@@ -144,8 +144,9 @@
// we can remove the extra logic below. See:
// http://code.google.com/p/chromium/issues/detail?id=41696 .
if (change_count < 1) {
- LOG(ERROR) << "Unexpected change_count: " << change_count;
- error_handler()->OnUnrecoverableError();
+ std::string err("Unexpected change_count: ");
+ err += change_count;
+ error_handler()->OnUnrecoverableError(FROM_HERE, err);
return;
}
if (change_count > 1) {
@@ -155,7 +156,8 @@
const sync_api::SyncManager::ChangeRecord& change =
changes[change_count - 1];
if (change.action != sync_api::SyncManager::ChangeRecord::ACTION_UPDATE) {
- LOG(WARNING) << "strange theme change.action: " << change.action;
+ std::string err = "strange theme change.action " + change.action;
+ error_handler()->OnUnrecoverableError(FROM_HERE, err);
}
sync_pb::ThemeSpecifics theme_specifics;
// If the action is a delete, simply use the default values for
@@ -163,8 +165,8 @@
if (change.action != sync_api::SyncManager::ChangeRecord::ACTION_DELETE) {
sync_api::ReadNode node(trans);
if (!node.InitByIdLookup(change.id)) {
- LOG(ERROR) << "Theme node lookup failed";
- error_handler()->OnUnrecoverableError();
+ error_handler()->OnUnrecoverableError(FROM_HERE,
+ "Theme node lookup failed.");
return;
}
DCHECK_EQ(node.GetModelType(), syncable::THEMES);
Property changes on: chrome\browser\sync\glue\theme_change_processor.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/sync/glue/preference_model_associator.cc ('k') | chrome/browser/sync/glue/theme_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698