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

Unified Diff: sync/syncable/mutable_entry.h

Issue 11636006: WIP: The Bookmark Position Megapatch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Various updates, including switch suffix to unique_client_tag style Created 8 years 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/syncable/entry_kernel.cc ('k') | sync/syncable/mutable_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/mutable_entry.h
diff --git a/sync/syncable/mutable_entry.h b/sync/syncable/mutable_entry.h
index f01fcf6b9e7234b5f996b324cd492f414b38875f..8bffada6bdd65de9e0fb3e37a66c36b562c6bb80 100644
--- a/sync/syncable/mutable_entry.h
+++ b/sync/syncable/mutable_entry.h
@@ -5,7 +5,7 @@
#ifndef SYNC_SYNCABLE_MUTABLE_ENTRY_H_
#define SYNC_SYNCABLE_MUTABLE_ENTRY_H_
-#include "sync/internal_api/public/base/node_ordinal.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/syncable/entry.h"
#include "sync/syncable/metahandle_set.h"
@@ -16,8 +16,12 @@ namespace syncable {
class WriteTransaction;
-enum Create {
- CREATE
+enum CreateBookmark {
+ CREATE_BOOKMARK
+};
+
+enum CreateUnique {
+ CREATE_UNIQUE
};
enum CreateNewUpdateItem {
@@ -27,12 +31,13 @@ enum CreateNewUpdateItem {
// A mutable meta entry. Changes get committed to the database when the
// WriteTransaction is destroyed.
class MutableEntry : public Entry {
- void Init(WriteTransaction* trans, const Id& parent_id,
- const std::string& name);
-
+ void Init(WriteTransaction* trans, ModelType model_type,
+ const Id& parent_id, const std::string& name);
public:
- MutableEntry(WriteTransaction* trans, Create, const Id& parent_id,
- const std::string& name);
+ MutableEntry(WriteTransaction* trans, CreateBookmark,
+ const Id& parent_id, const std::string& name);
+ MutableEntry(WriteTransaction* trans, CreateUnique, ModelType model_type,
+ const Id& parent_id, const std::string& name);
MutableEntry(WriteTransaction* trans, CreateNewUpdateItem, const Id& id);
MutableEntry(WriteTransaction* trans, GetByHandle, int64);
MutableEntry(WriteTransaction* trans, GetById, const Id&);
@@ -50,7 +55,7 @@ class MutableEntry : public Entry {
bool Put(Int64Field field, const int64& value);
bool Put(TimeField field, const base::Time& value);
bool Put(IdField field, const Id& value);
- bool Put(OrdinalField field, const NodeOrdinal& value);
+ bool Put(UniquePositionField field, const UniquePosition& value);
// Do a simple property-only update if the PARENT_ID field. Use with caution.
//
@@ -73,6 +78,8 @@ class MutableEntry : public Entry {
}
bool Put(IndexedBitField field, bool value);
+ void PutUniqueBookmarkTag(const std::string& tag);
+
// Sets the position of this item, and updates the entry kernels of the
// adjacent siblings so that list invariants are maintained. Returns false
// and fails if |predecessor_id| does not identify a sibling. Pass the root
« no previous file with comments | « sync/syncable/entry_kernel.cc ('k') | sync/syncable/mutable_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698