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

Unified Diff: chrome/browser/sync/internal_api/base_node.cc

Issue 8402014: [Sync] Make GetFirstChildId return a flag indicating success (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 years, 2 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/internal_api/base_node.cc
diff --git a/chrome/browser/sync/internal_api/base_node.cc b/chrome/browser/sync/internal_api/base_node.cc
index 2aa212c98aab427db77e477521e3f75db3e9b184..31c039d4576dd73267a1b25ce3d5d5bb969564f5 100644
--- a/chrome/browser/sync/internal_api/base_node.cc
+++ b/chrome/browser/sync/internal_api/base_node.cc
@@ -224,8 +224,11 @@ int64 BaseNode::GetSuccessorId() const {
int64 BaseNode::GetFirstChildId() const {
syncable::Directory* dir = GetTransaction()->GetLookup();
syncable::BaseTransaction* trans = GetTransaction()->GetWrappedTrans();
- syncable::Id id_string =
- dir->GetFirstChildId(trans, GetEntry()->Get(syncable::ID));
+ syncable::Id id_string;
+ // TODO(akalin): Propagate up the error further (see
+ // http://crbug.com/100907).
+ CHECK(dir->GetFirstChildId(trans,
+ GetEntry()->Get(syncable::ID), &id_string));
if (id_string.IsRoot())
return kInvalidId;
return IdToMetahandle(GetTransaction()->GetWrappedTrans(), id_string);

Powered by Google App Engine
This is Rietveld 408576698