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

Unified Diff: chrome/browser/sync/profile_sync_service_typed_url_unittest.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/profile_sync_service_typed_url_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
index bbcde9e6226f861d0cc553a8b9764bc82df6b5a2..c4862ea9888f7bc058cea31de42d49c78a16f41f 100644
--- a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
@@ -145,7 +145,8 @@ class ProfileSyncServiceTypedUrlTest : public AbstractProfileSyncServiceTest {
const history::VisitVector& visits) {
sync_api::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
sync_api::ReadNode typed_url_root(&trans);
- ASSERT_TRUE(typed_url_root.InitByTagLookup(browser_sync::kTypedUrlTag));
+ ASSERT_EQ(sync_api::BaseNode::INIT_OK,
+ typed_url_root.InitByTagLookup(browser_sync::kTypedUrlTag));
sync_api::WriteNode node(&trans);
std::string tag = url.url().spec();
@@ -230,13 +231,14 @@ class ProfileSyncServiceTypedUrlTest : public AbstractProfileSyncServiceTest {
urls->clear();
sync_api::ReadTransaction trans(FROM_HERE, service_->GetUserShare());
sync_api::ReadNode typed_url_root(&trans);
- if (!typed_url_root.InitByTagLookup(browser_sync::kTypedUrlTag))
+ if (typed_url_root.InitByTagLookup(browser_sync::kTypedUrlTag) !=
+ sync_api::BaseNode::INIT_OK)
return;
int64 child_id = typed_url_root.GetFirstChildId();
while (child_id != sync_api::kInvalidId) {
sync_api::ReadNode child_node(&trans);
- if (!child_node.InitByIdLookup(child_id))
+ if (child_node.InitByIdLookup(child_id) != sync_api::BaseNode::INIT_OK)
return;
const sync_pb::TypedUrlSpecifics& typed_url(

Powered by Google App Engine
This is Rietveld 408576698