summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-23 03:34:41 +0000
committeratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-23 03:34:41 +0000
commit1027173b8068c0b31786bedbc9132c00ad34b434 (patch)
tree0b12157d3db3722a7b0eb4c1e1a8350ad17ae22c
parent32fcf1f67710a2cc2166a6c181383d8b9c2e60e1 (diff)
downloadchromium_src-1027173b8068c0b31786bedbc9132c00ad34b434.zip
chromium_src-1027173b8068c0b31786bedbc9132c00ad34b434.tar.gz
chromium_src-1027173b8068c0b31786bedbc9132c00ad34b434.tar.bz2
Updated info logged when with typed url unrecoverable errors
This should allow us to more easily debug some unrecoverable errors marc is seeing on the canary channel. BUG=none TEST=none Review URL: http://codereview.chromium.org/8008004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102437 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/sync/glue/typed_url_model_associator.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/sync/glue/typed_url_model_associator.cc b/chrome/browser/sync/glue/typed_url_model_associator.cc
index 2b55709..9fcc68e 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;
}