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

Side by Side Diff: sync/internal_api/public/write_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_WRITE_NODE_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_WRITE_NODE_H_
6 #define SYNC_INTERNAL_API_PUBLIC_WRITE_NODE_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_WRITE_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/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "sync/internal_api/public/base/model_type.h" 13 #include "sync/internal_api/public/base/model_type.h"
14 #include "sync/internal_api/public/base_node.h" 14 #include "sync/internal_api/public/base_node.h"
15 15
16 namespace sync_pb { 16 namespace sync_pb {
17 class AppSpecifics; 17 class AppSpecifics;
18 class AutofillProfileSpecifics;
18 class AutofillSpecifics; 19 class AutofillSpecifics;
19 class AutofillProfileSpecifics;
20 class BookmarkSpecifics; 20 class BookmarkSpecifics;
21 class EntitySpecifics; 21 class EntitySpecifics;
22 class ExtensionSpecifics; 22 class ExtensionSpecifics;
23 class SessionSpecifics;
24 class NigoriSpecifics; 23 class NigoriSpecifics;
25 class PasswordSpecificsData; 24 class PasswordSpecificsData;
25 class PerDeviceSpecifics;
26 class PerUserSpecifics;
27 class SessionSpecifics;
26 class ThemeSpecifics; 28 class ThemeSpecifics;
27 class TypedUrlSpecifics; 29 class TypedUrlSpecifics;
28 } 30 }
29 31
30 namespace syncer { 32 namespace syncer {
31 33
32 class Cryptographer; 34 class Cryptographer;
33 class TestBookmarkModelAssociator; 35 class TestBookmarkModelAssociator;
34 class WriteTransaction; 36 class WriteTransaction;
35 37
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 void SetTypedUrlSpecifics(const sync_pb::TypedUrlSpecifics& specifics); 159 void SetTypedUrlSpecifics(const sync_pb::TypedUrlSpecifics& specifics);
158 160
159 // Set the extension specifics (id, update url, enabled state, etc). 161 // Set the extension specifics (id, update url, enabled state, etc).
160 // Should only be called if GetModelType() == EXTENSIONS. 162 // Should only be called if GetModelType() == EXTENSIONS.
161 void SetExtensionSpecifics(const sync_pb::ExtensionSpecifics& specifics); 163 void SetExtensionSpecifics(const sync_pb::ExtensionSpecifics& specifics);
162 164
163 // Set the session specifics (windows, tabs, navigations etc.). 165 // Set the session specifics (windows, tabs, navigations etc.).
164 // Should only be called if GetModelType() == SESSIONS. 166 // Should only be called if GetModelType() == SESSIONS.
165 void SetSessionSpecifics(const sync_pb::SessionSpecifics& specifics); 167 void SetSessionSpecifics(const sync_pb::SessionSpecifics& specifics);
166 168
169 // Set the per-device metadata specifics.
170 // Should only be called if GetModelType() == PER_DEVICE_METADATA.
171 void SetPerDeviceSpecifics(const sync_pb::PerDeviceSpecifics& specifics);
172
173 // Set the per-account metadata specifics.
174 // Should only be called if GetModelType() == PER_USER_METADATA.
175 void SetPerUserSpecifics(const sync_pb::PerUserSpecifics& specifics);
176
167 // Implementation of BaseNode's abstract virtual accessors. 177 // Implementation of BaseNode's abstract virtual accessors.
168 virtual const syncable::Entry* GetEntry() const OVERRIDE; 178 virtual const syncable::Entry* GetEntry() const OVERRIDE;
169 179
170 virtual const BaseTransaction* GetTransaction() const OVERRIDE; 180 virtual const BaseTransaction* GetTransaction() const OVERRIDE;
171 181
172 syncable::MutableEntry* GetMutableEntryForTest(); 182 syncable::MutableEntry* GetMutableEntryForTest();
173 183
174 private: 184 private:
175 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, EncryptBookmarksWithLegacyData); 185 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, EncryptBookmarksWithLegacyData);
176 186
(...skipping 14 matching lines...) Expand all
191 201
192 // The sync API transaction that is the parent of this node. 202 // The sync API transaction that is the parent of this node.
193 WriteTransaction* transaction_; 203 WriteTransaction* transaction_;
194 204
195 DISALLOW_COPY_AND_ASSIGN(WriteNode); 205 DISALLOW_COPY_AND_ASSIGN(WriteNode);
196 }; 206 };
197 207
198 } // namespace syncer 208 } // namespace syncer
199 209
200 #endif // SYNC_INTERNAL_API_PUBLIC_WRITE_NODE_H_ 210 #endif // SYNC_INTERNAL_API_PUBLIC_WRITE_NODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698