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

Unified Diff: chrome/browser/sync/profile_sync_service.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/profile_sync_service.cc
===================================================================
--- chrome/browser/sync/profile_sync_service.cc (revision 48898)
+++ chrome/browser/sync/profile_sync_service.cc (working copy)
@@ -400,10 +400,15 @@
// An invariant has been violated. Transition to an error state where we try
// to do as little work as possible, to avoid further corruption or crashes.
-void ProfileSyncService::OnUnrecoverableError() {
+void ProfileSyncService::OnUnrecoverableError(
+ const tracked_objects::Location& from_here,
+ const std::string& message) {
unrecoverable_error_detected_ = true;
- // TODO(sync) remove this unrecoverable_error_detected_ variable_ as it only
- // affects ShouldPushChanges().
+ unrecoverable_error_message_ = message;
+ unrecoverable_error_location_.reset(
+ new tracked_objects::Location(from_here.function_name(),
+ from_here.file_name(),
+ from_here.line_number()));
// Shut all data types down.
if (data_type_manager_.get())
@@ -414,6 +419,9 @@
FOR_EACH_OBSERVER(Observer, observers_, OnStateChanged());
LOG(ERROR) << "Unrecoverable error detected -- ProfileSyncService unusable.";
+ std::string location;
+ from_here.Write(true, true, &location);
+ LOG(ERROR) << location;
if (WizardIsVisible()) {
// We've hit an error in the middle of a startup process- shutdown all the
@@ -678,7 +686,7 @@
DataTypeManager::ConfigureResult result =
*(Details<DataTypeManager::ConfigureResult>(details).ptr());
if (result != DataTypeManager::OK) {
- OnUnrecoverableError();
+ OnUnrecoverableError(FROM_HERE, "Sync Configuration failed.");
return;
}
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | chrome/browser/sync/profile_sync_service_autofill_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698