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

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

Issue 10310113: Add additional error logging to investigate Autocomplete Sync failures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: De-nitting Created 8 years, 7 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/session_model_associator.cc
diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc
index d89576bae93acf05f113932828eb9b0a66898161..d7f58b09821230676412c40eeaadbe238f619de2 100644
--- a/chrome/browser/sync/glue/session_model_associator.cc
+++ b/chrome/browser/sync/glue/session_model_associator.cc
@@ -765,9 +765,9 @@ SyncError SessionModelAssociator::AssociateModels() {
if (local_session_syncid_ == sync_api::kInvalidId) {
// The sync db didn't have a header node for us, we need to create one.
sync_api::WriteNode write_node(&trans);
- if (!write_node.InitUniqueByCreation(SESSIONS,
- root,
- current_machine_tag_)) {
+ sync_api::WriteNode::InitUniqueByCreationResult result =
+ write_node.InitUniqueByCreation(SESSIONS, root, current_machine_tag_);
+ if (result != sync_api::WriteNode::INIT_SUCCESS) {
// If we can't look it up, and we can't create it, chances are there's
// a pre-existing node that has encryption issues. But, since we can't
// load the item, we can't remove it, and error out at this point.
@@ -1354,7 +1354,9 @@ int64 SessionModelAssociator::TabNodePool::GetFreeTabNode() {
size_t tab_node_id = tab_syncid_pool_.size();
std::string tab_node_tag = TabIdToTag(machine_tag_, tab_node_id);
sync_api::WriteNode tab_node(&trans);
- if (!tab_node.InitUniqueByCreation(SESSIONS, root, tab_node_tag)) {
+ sync_api::WriteNode::InitUniqueByCreationResult result =
+ tab_node.InitUniqueByCreation(SESSIONS, root, tab_node_tag);
+ if (result != sync_api::WriteNode::INIT_SUCCESS) {
LOG(ERROR) << "Could not create new node with tag "
<< tab_node_tag << "!";
return sync_api::kInvalidId;
« no previous file with comments | « chrome/browser/sync/glue/password_model_associator.cc ('k') | chrome/browser/sync/glue/theme_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698