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

Unified Diff: chrome/browser/sync/engine/syncapi.h

Issue 4124013: autofill code review. Base URL: http://git.chromium.org/git/chromium.git
Patch Set: Created 10 years, 2 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 | « chrome/browser/sync/engine/ReadNodeMock.h ('k') | chrome/browser/sync/engine/syncapi.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/syncapi.h
diff --git a/chrome/browser/sync/engine/syncapi.h b/chrome/browser/sync/engine/syncapi.h
index 9a3da9b3e5ebd0861f16a746f821960ac78a01ab..9112d12f9fb36d28aac536b02d0d1f436d4e5c1f 100644
--- a/chrome/browser/sync/engine/syncapi.h
+++ b/chrome/browser/sync/engine/syncapi.h
@@ -81,6 +81,7 @@ class WriteTransaction;
namespace sync_pb {
class AppSpecifics;
class AutofillSpecifics;
+class AutofillProfile2Specifics;
class BookmarkSpecifics;
class EntitySpecifics;
class ExtensionSpecifics;
@@ -149,7 +150,7 @@ class BaseNode {
// metahandle). These ids are strictly local handles. They will persist
// on this client, but the same object on a different client may have a
// different ID value.
- int64 GetId() const;
+ virtual int64 GetId() const;
// Nodes are hierarchically arranged into a single-rooted tree.
// InitByRootLookup on ReadNode allows access to the root. GetParentId is
@@ -195,6 +196,8 @@ class BaseNode {
// data. Can only be called if GetModelType() == AUTOFILL.
const sync_pb::AutofillSpecifics& GetAutofillSpecifics() const;
+ virtual const sync_pb::AutofillProfile2Specifics& GetAutofillProfileSpecifics() const;
+
// Getter specific to the NIGORI datatype. Returns protobuf
// data. Can only be called if GetModelType() == NIGORI.
const sync_pb::NigoriSpecifics& GetNigoriSpecifics() const;
@@ -232,11 +235,11 @@ class BaseNode {
// Return the ID of the node immediately after this in the sibling order.
// For the last node in the ordering, return 0.
- int64 GetSuccessorId() const;
+ virtual int64 GetSuccessorId() const;
// Return the ID of the first child of this node. If this node has no
// children, return 0.
- int64 GetFirstChildId() const;
+ virtual int64 GetFirstChildId() const;
// These virtual accessors provide access to data members of derived classes.
virtual const syncable::Entry* GetEntry() const = 0;
@@ -256,9 +259,6 @@ class BaseNode {
bool DecryptIfNecessary(syncable::Entry* entry);
private:
- // Node is meant for stack use only.
- void* operator new(size_t size);
-
// If this node represents a password, this field will hold the actual
// decrypted password data.
scoped_ptr<sync_pb::PasswordSpecificsData> password_data_;
@@ -436,6 +436,8 @@ class ReadNode : public BaseNode {
explicit ReadNode(const BaseTransaction* transaction);
virtual ~ReadNode();
+ void Reset();
+
// A client must use one (and only one) of the following Init variants to
// populate the node.
@@ -457,9 +459,10 @@ class ReadNode : public BaseNode {
virtual const syncable::Entry* GetEntry() const;
virtual const BaseTransaction* GetTransaction() const;
- private:
- void* operator new(size_t size); // Node is meant for stack use only.
+protected:
+ ReadNode() {entry_ = NULL; transaction_ = NULL;}
+private:
// The underlying syncable object which this class wraps.
syncable::Entry* entry_;
« no previous file with comments | « chrome/browser/sync/engine/ReadNodeMock.h ('k') | chrome/browser/sync/engine/syncapi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698