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

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

Issue 9978017: [Sync] - Upload the callstacks for errors so that the line number of error is in callstack. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/typed_url_change_processor.cc
diff --git a/chrome/browser/sync/glue/typed_url_change_processor.cc b/chrome/browser/sync/glue/typed_url_change_processor.cc
index 74fc78c184a925df431480c2df4f10513b194a63..6bd7be089f221184b00a9f39b0434cd1f4d6a522 100644
--- a/chrome/browser/sync/glue/typed_url_change_processor.cc
+++ b/chrome/browser/sync/glue/typed_url_change_processor.cc
@@ -243,9 +243,10 @@ void TypedUrlChangeProcessor::ApplyChangesFromSyncModel(
continue;
}
- if (!model_associator_->UpdateFromSyncDB(
- filtered_url, &pending_new_visits_, &pending_deleted_visits_,
- &pending_updated_urls_, &pending_new_urls_)) {
+ SyncError error = model_associator_->UpdateFromSyncDB(
+ filtered_url, &pending_new_visits_, &pending_deleted_visits_,
+ &pending_updated_urls_, &pending_new_urls_);
+ if (error.IsSet()) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Could not get existing url's visits.");
return;
@@ -264,10 +265,13 @@ void TypedUrlChangeProcessor::CommitChangesFromSyncModel() {
if (!pending_deleted_urls_.empty())
history_backend_->DeleteURLs(pending_deleted_urls_);
- if (!model_associator_->WriteToHistoryBackend(&pending_new_urls_,
- &pending_updated_urls_,
- &pending_new_visits_,
- &pending_deleted_visits_)) {
+ SyncError error = model_associator_->WriteToHistoryBackend(
+ &pending_new_urls_,
+ &pending_updated_urls_,
+ &pending_new_visits_,
+ &pending_deleted_visits_);
+
+ if (error.IsSet()) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Could not write to the history backend.");
return;
« no previous file with comments | « chrome/browser/sync/glue/theme_model_associator.cc ('k') | chrome/browser/sync/glue/typed_url_model_associator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698