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

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

Issue 319553004: sync: only use RecordUnrecoverableError for legacy types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style fix Created 6 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/non_ui_data_type_controller.cc
diff --git a/chrome/browser/sync/glue/non_ui_data_type_controller.cc b/chrome/browser/sync/glue/non_ui_data_type_controller.cc
index d10e4dc64b25ea493b366af02e40b6e0b7ed757b..bdec6433c31c8fee5bc5a0801157ed461b3c6185 100644
--- a/chrome/browser/sync/glue/non_ui_data_type_controller.cc
+++ b/chrome/browser/sync/glue/non_ui_data_type_controller.cc
@@ -176,7 +176,12 @@ DataTypeController::State NonUIDataTypeController::state() const {
void NonUIDataTypeController::OnSingleDatatypeUnrecoverableError(
const tracked_objects::Location& from_here, const std::string& message) {
DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
- RecordUnrecoverableError(from_here, message);
+ // TODO(tim): We double-upload some errors. See bug 383480.
+ if (!error_callback_.is_null())
+ error_callback_.Run();
+ UMA_HISTOGRAM_ENUMERATION("Sync.DataTypeRunFailures",
+ ModelTypeToHistogramInt(type()),
+ syncer::MODEL_TYPE_COUNT);
BrowserThread::PostTask(BrowserThread::UI, from_here,
base::Bind(&NonUIDataTypeController::DisableImpl,
this,
@@ -219,9 +224,6 @@ void NonUIDataTypeController::StartDoneImpl(
const syncer::SyncMergeResult& syncer_merge_result) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (IsUnrecoverableResult(start_result))
- RecordUnrecoverableError(FROM_HERE, "StartFailed");
-
// If we failed to start up, and we haven't been stopped yet, we need to
// ensure we clean up the local service and shared change processor properly.
if (new_state != RUNNING && state() != NOT_RUNNING && state() != STOPPING) {

Powered by Google App Engine
This is Rietveld 408576698