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

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

Issue 8008004: Updated info logged when with typed url unrecoverable errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/typed_url_model_associator.cc
diff --git a/chrome/browser/sync/glue/typed_url_model_associator.cc b/chrome/browser/sync/glue/typed_url_model_associator.cc
index 2b55709c76ffc194590be82317d28a0f60a1e8fa..9fcc68eab67a0b517e7be18ae4f218553d47fcc1 100644
--- a/chrome/browser/sync/glue/typed_url_model_associator.cc
+++ b/chrome/browser/sync/glue/typed_url_model_associator.cc
@@ -144,6 +144,14 @@ bool TypedUrlModelAssociator::AssociateModels(SyncError* error) {
ix != typed_urls.end(); ++ix) {
std::string tag = ix->url().spec();
+ // Should never see an empty tag.
+ if (tag.empty()) {
+ error->Reset(FROM_HERE,
+ "Encountered history entry with an empty url.",
+ model_type());
+ return false;
+ }
+
history::VisitVector& visits = visit_vectors[ix->id()];
sync_api::ReadNode node(&trans);
@@ -211,7 +219,7 @@ bool TypedUrlModelAssociator::AssociateModels(SyncError* error) {
if (!node.InitUniqueByCreation(syncable::TYPED_URLS,
typed_url_root, tag)) {
error->Reset(FROM_HERE,
- "Failed to create typed_url sync node.",
+ "Failed to create typed_url sync node: " + tag,
model_type());
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698