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

Unified Diff: sync/internal_api/public/read_node.h

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/engine/syncer_unittest.cc ('k') | sync/internal_api/public/write_node.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/public/read_node.h
diff --git a/sync/internal_api/public/read_node.h b/sync/internal_api/public/read_node.h
index 50e7639e29bb44d0e3cbfe81dcaaf8371eca6c1e..e3d37b5454acbed2caeab13fbe730cdaa18b134a 100644
--- a/sync/internal_api/public/read_node.h
+++ b/sync/internal_api/public/read_node.h
@@ -37,10 +37,17 @@ class SYNC_EXPORT ReadNode : public BaseNode {
// never mutable, so root lookup is only possible on a ReadNode.
void InitByRootLookup();
- // Each server-created permanent node is tagged with a unique string.
- // Look up the node with the particular tag. If it does not exist,
- // return false.
- InitByLookupResult InitByTagLookup(const std::string& tag);
+ // Returns the type root node, if it exists. This is usually created by the
+ // server during first sync. Eventually, we plan to remove support for it
+ // from the protocol and have the client create the node instead.
+ InitByLookupResult InitTypeRoot(ModelType type);
+
+ // Returns a server-created and unique-server-tagged item.
+ //
+ // This functionality is only useful for bookmarks because only bookmarks
+ // have server-tagged items. All other server-tagged items are type root
+ // nodes, which should be looked up with InitTypeRoot().
+ InitByLookupResult InitByTagLookupForBookmarks(const std::string& tag);
// Implementation of BaseNode's abstract virtual accessors.
virtual const syncable::Entry* GetEntry() const OVERRIDE;
« no previous file with comments | « sync/engine/syncer_unittest.cc ('k') | sync/internal_api/public/write_node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698