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

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

Issue 11863011: Revert 176340 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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: sync/internal_api/public/write_node.h
===================================================================
--- sync/internal_api/public/write_node.h (revision 176351)
+++ sync/internal_api/public/write_node.h (working copy)
@@ -67,12 +67,15 @@
ModelType model_type,
const std::string& tag) OVERRIDE;
- // Create a new bookmark node with the specified parent and predecessor. Use
- // a NULL |predecessor| to indicate that this is to be the first child.
+ // Create a new node with the specified parent and predecessor. |model_type|
+ // dictates the type of the item, and controls which EntitySpecifics proto
+ // extension can be used with this item. Use a NULL |predecessor|
+ // to indicate that this is to be the first child.
// |predecessor| must be a child of |new_parent| or NULL. Returns false on
// failure.
- bool InitBookmarkByCreation(const BaseNode& parent,
- const BaseNode* predecessor);
+ bool InitByCreation(ModelType model_type,
+ const BaseNode& parent,
+ const BaseNode* predecessor);
// Create nodes using this function if they're unique items that
// you want to fetch using client_tag. Note that the behavior of these
@@ -180,6 +183,9 @@
void* operator new(size_t size); // Node is meant for stack use only.
+ // Helper to set model type. This will clear any specifics data.
+ void PutModelType(ModelType model_type);
+
// Helper to set the previous node.
bool PutPredecessor(const BaseNode* predecessor) WARN_UNUSED_RESULT;
« no previous file with comments | « sync/internal_api/public/test/test_entry_factory.h ('k') | sync/internal_api/sync_encryption_handler_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698