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

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

Issue 10152003: sync: Make BaseNode lookup-related Init functions return specific failures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/session_change_processor.cc
diff --git a/chrome/browser/sync/glue/session_change_processor.cc b/chrome/browser/sync/glue/session_change_processor.cc
index 16dfc2806492bab9d4db42e17955d6ee0d53a6da..b4dd8bf91c6233f1ab497856dfaeea0f4bfeecc4 100644
--- a/chrome/browser/sync/glue/session_change_processor.cc
+++ b/chrome/browser/sync/glue/session_change_processor.cc
@@ -269,7 +269,7 @@ void SessionChangeProcessor::ApplyChangesFromSyncModel(
ScopedStopObserving<SessionChangeProcessor> stop_observing(this);
sync_api::ReadNode root(trans);
- if (!root.InitByTagLookup(kSessionsTag)) {
+ if (root.InitByTagLookup(kSessionsTag) != sync_api::BaseNode::INIT_OK) {
error_handler()->OnUnrecoverableError(FROM_HERE,
"Sessions root node lookup failed.");
return;
@@ -302,7 +302,7 @@ void SessionChangeProcessor::ApplyChangesFromSyncModel(
// Handle an update or add.
sync_api::ReadNode sync_node(trans);
- if (!sync_node.InitByIdLookup(change.id)) {
+ if (sync_node.InitByIdLookup(change.id) != sync_api::BaseNode::INIT_OK) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Session node lookup failed.");
return;
« no previous file with comments | « chrome/browser/sync/glue/password_model_associator.cc ('k') | chrome/browser/sync/glue/session_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698