Index: chrome/browser/sync/profile_sync_service_preference_unittest.cc |
diff --git a/chrome/browser/sync/profile_sync_service_preference_unittest.cc b/chrome/browser/sync/profile_sync_service_preference_unittest.cc |
index da17a86d9bb32187473afad24aafa9437b3c1eb7..ab883309fcb9be2321b93ac65e10739d6eb8efa7 100644 |
--- a/chrome/browser/sync/profile_sync_service_preference_unittest.cc |
+++ b/chrome/browser/sync/profile_sync_service_preference_unittest.cc |
@@ -63,16 +63,19 @@ class ProfileSyncServicePreferenceTest |
int64 SetSyncedValue(const std::string& name, const Value& value) { |
sync_api::WriteTransaction trans(FROM_HERE, service_->GetUserShare()); |
sync_api::ReadNode root(&trans); |
- if (!root.InitByTagLookup( |
- syncable::ModelTypeToRootTag(syncable::PREFERENCES))) { |
+ if (root.InitByTagLookup( |
+ syncable::ModelTypeToRootTag(syncable::PREFERENCES)) != |
Nicolas Zea
2012/04/19 23:55:43
nit: move to prev line? (if it fits)
tim (not reviewing)
2012/04/20 18:27:04
Done.
|
+ sync_api::BaseNode::INIT_OK) { |
return sync_api::kInvalidId; |
} |
sync_api::WriteNode tag_node(&trans); |
sync_api::WriteNode node(&trans); |
- if (tag_node.InitByClientTagLookup(syncable::PREFERENCES, name)) |
+ if (tag_node.InitByClientTagLookup(syncable::PREFERENCES, name) == |
+ sync_api::BaseNode::INIT_OK) { |
return WriteSyncedValue(name, value, &tag_node); |
+ } |
if (node.InitUniqueByCreation(syncable::PREFERENCES, root, name)) |
return WriteSyncedValue(name, value, &node); |
@@ -158,8 +161,10 @@ class ProfileSyncServicePreferenceTest |
sync_api::ReadTransaction trans(FROM_HERE, service_->GetUserShare()); |
sync_api::ReadNode node(&trans); |
- if (!node.InitByClientTagLookup(syncable::PREFERENCES, name)) |
+ if (node.InitByClientTagLookup(syncable::PREFERENCES, name) != |
+ sync_api::BaseNode::INIT_OK) { |
return NULL; |
+ } |
const sync_pb::PreferenceSpecifics& specifics( |
node.GetEntitySpecifics().preference()); |