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

Side by Side Diff: sync/internal_api/public/base_node.h

Issue 10825137: FYI: Control Data + Per-Device Metadata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add PER_USER_METADATA, refactor some encryption code Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_
6 #define SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "googleurl/src/gurl.h" 14 #include "googleurl/src/gurl.h"
15 #include "sync/internal_api/public/base/model_type.h" 15 #include "sync/internal_api/public/base/model_type.h"
16 #include "sync/protocol/sync.pb.h" 16 #include "sync/protocol/sync.pb.h"
17 17
18 // Forward declarations of internal class types so that sync API objects 18 // Forward declarations of internal class types so that sync API objects
19 // may have opaque pointers to these types. 19 // may have opaque pointers to these types.
20 namespace base { 20 namespace base {
21 class DictionaryValue; 21 class DictionaryValue;
22 } 22 }
23 23
24 namespace sync_pb { 24 namespace sync_pb {
25 class AppSpecifics; 25 class AppSpecifics;
26 class AutofillProfileSpecifics;
26 class AutofillSpecifics; 27 class AutofillSpecifics;
27 class AutofillProfileSpecifics;
28 class BookmarkSpecifics; 28 class BookmarkSpecifics;
29 class EntitySpecifics; 29 class EntitySpecifics;
30 class ExtensionSpecifics; 30 class ExtensionSpecifics;
31 class NigoriSpecifics;
32 class PasswordSpecificsData;
33 class PerDeviceSpecifics;
34 class PerUserSpecifics;
35 class PreferenceSpecifics;
31 class SessionSpecifics; 36 class SessionSpecifics;
32 class NigoriSpecifics;
33 class PreferenceSpecifics;
34 class PasswordSpecificsData;
35 class ThemeSpecifics; 37 class ThemeSpecifics;
36 class TypedUrlSpecifics; 38 class TypedUrlSpecifics;
37 } 39 }
38 40
39 namespace syncer { 41 namespace syncer {
40 42
41 class BaseTransaction; 43 class BaseTransaction;
42 44
43 namespace syncable { 45 namespace syncable {
44 class BaseTransaction; 46 class BaseTransaction;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 const sync_pb::TypedUrlSpecifics& GetTypedUrlSpecifics() const; 160 const sync_pb::TypedUrlSpecifics& GetTypedUrlSpecifics() const;
159 161
160 // Getter specific to the EXTENSIONS datatype. Returns protobuf 162 // Getter specific to the EXTENSIONS datatype. Returns protobuf
161 // data. Can only be called if GetModelType() == EXTENSIONS. 163 // data. Can only be called if GetModelType() == EXTENSIONS.
162 const sync_pb::ExtensionSpecifics& GetExtensionSpecifics() const; 164 const sync_pb::ExtensionSpecifics& GetExtensionSpecifics() const;
163 165
164 // Getter specific to the SESSIONS datatype. Returns protobuf 166 // Getter specific to the SESSIONS datatype. Returns protobuf
165 // data. Can only be called if GetModelType() == SESSIONS. 167 // data. Can only be called if GetModelType() == SESSIONS.
166 const sync_pb::SessionSpecifics& GetSessionSpecifics() const; 168 const sync_pb::SessionSpecifics& GetSessionSpecifics() const;
167 169
170 // Getter specific to the PER_DEVICE_METADATA datatype. Returns protobuf
171 // data. Can only be called if GetModelType() == PER_DEVICE_METADATA.
172 const sync_pb::PerDeviceSpecifics& GetPerDeviceSpecifics() const;
173
174 // Getter specific to the PER_USER_METADATA datatype. Returns protobuf data.
175 // Can only be called if GetModelType() == PER_USERMETADATA.
rlarocque 2012/08/11 01:31:52 FIXME: typo.
176 const sync_pb::PerUserSpecifics& GetPerUserSpecifics() const;
rlarocque 2012/08/11 01:31:52 I'm not sure if this function is necessary. Accor
177
168 const sync_pb::EntitySpecifics& GetEntitySpecifics() const; 178 const sync_pb::EntitySpecifics& GetEntitySpecifics() const;
169 179
170 // Returns the local external ID associated with the node. 180 // Returns the local external ID associated with the node.
171 int64 GetExternalId() const; 181 int64 GetExternalId() const;
172 182
173 // Returns true iff this node has children. 183 // Returns true iff this node has children.
174 bool HasChildren() const; 184 bool HasChildren() const;
175 185
176 // Return the ID of the node immediately before this in the sibling order. 186 // Return the ID of the node immediately before this in the sibling order.
177 // For the first node in the ordering, return 0. 187 // For the first node in the ordering, return 0.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 256
247 // Same as |unencrypted_data_|, but for legacy password encryption. 257 // Same as |unencrypted_data_|, but for legacy password encryption.
248 scoped_ptr<sync_pb::PasswordSpecificsData> password_data_; 258 scoped_ptr<sync_pb::PasswordSpecificsData> password_data_;
249 259
250 DISALLOW_COPY_AND_ASSIGN(BaseNode); 260 DISALLOW_COPY_AND_ASSIGN(BaseNode);
251 }; 261 };
252 262
253 } // namespace syncer 263 } // namespace syncer
254 264
255 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_ 265 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698