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

Unified Diff: sync/internal_api/write_node.cc

Issue 302173004: sync: Specialize functions that fetch type root (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/GET_BY_SERVER_TAG_DEPRECATED/GET_BY_SERVER_TAG/ Created 6 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
« no previous file with comments | « sync/internal_api/sync_rollback_manager_unittest.cc ('k') | sync/syncable/directory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/write_node.cc
diff --git a/sync/internal_api/write_node.cc b/sync/internal_api/write_node.cc
index cefd6dfd4afaa285b69f9542fce9d70d3b6e56c0..1fbe029ab1689a9508c0215321fc610946f84eb8 100644
--- a/sync/internal_api/write_node.cc
+++ b/sync/internal_api/write_node.cc
@@ -310,13 +310,12 @@ BaseNode::InitByLookupResult WriteNode::InitByClientTagLookup(
return DecryptIfNecessary() ? INIT_OK : INIT_FAILED_DECRYPT_IF_NECESSARY;
}
-BaseNode::InitByLookupResult WriteNode::InitByTagLookup(
- const std::string& tag) {
+BaseNode::InitByLookupResult WriteNode::InitTypeRoot(ModelType type) {
DCHECK(!entry_) << "Init called twice";
- if (tag.empty())
+ if (!IsRealDataType(type))
return INIT_FAILED_PRECONDITION;
entry_ = new syncable::MutableEntry(transaction_->GetWrappedWriteTrans(),
- syncable::GET_BY_SERVER_TAG, tag);
+ syncable::GET_TYPE_ROOT, type);
if (!entry_->good())
return INIT_FAILED_ENTRY_NOT_GOOD;
if (entry_->GetIsDel())
« no previous file with comments | « sync/internal_api/sync_rollback_manager_unittest.cc ('k') | sync/syncable/directory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698