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

Side by Side Diff: chrome/browser/sync/internal_api/base_node.h

Issue 8759019: [Sync] Add intelligent re-encryption support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self review Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_INTERNAL_API_BASE_NODE_H_ 5 #ifndef CHROME_BROWSER_SYNC_INTERNAL_API_BASE_NODE_H_
6 #define CHROME_BROWSER_SYNC_INTERNAL_API_BASE_NODE_H_ 6 #define CHROME_BROWSER_SYNC_INTERNAL_API_BASE_NODE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // Returns the unencrypted specifics associated with |entry|. If |entry| was 201 // Returns the unencrypted specifics associated with |entry|. If |entry| was
202 // not encrypted, it directly returns |entry|'s EntitySpecifics. Otherwise, 202 // not encrypted, it directly returns |entry|'s EntitySpecifics. Otherwise,
203 // returns |unencrypted_data_|. 203 // returns |unencrypted_data_|.
204 const sync_pb::EntitySpecifics& GetUnencryptedSpecifics( 204 const sync_pb::EntitySpecifics& GetUnencryptedSpecifics(
205 const syncable::Entry* entry) const; 205 const syncable::Entry* entry) const;
206 206
207 // Copy |specifics| into |unencrypted_data_|. 207 // Copy |specifics| into |unencrypted_data_|.
208 void SetUnencryptedSpecifics(const sync_pb::EntitySpecifics& specifics); 208 void SetUnencryptedSpecifics(const sync_pb::EntitySpecifics& specifics);
209 209
210 private: 210 private:
211 friend class SyncApiTest;
akalin 2011/12/06 18:28:02 i think the 'friend class' declarations are unnece
Nicolas Zea 2011/12/06 20:45:36 One of them is, the other not. The FREIND_TEST_ALL
akalin 2011/12/09 23:52:42 Ah, right, can you add a comment explaining why th
Nicolas Zea 2011/12/12 20:12:26 Done.
212 FRIEND_TEST_ALL_PREFIXES(SyncApiTest, GenerateSyncableHash);
213 friend class SyncManagerTest;
214 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, UpdateEntryWithEncryption);
215
211 void* operator new(size_t size); // Node is meant for stack use only. 216 void* operator new(size_t size); // Node is meant for stack use only.
212 217
213 // A holder for the unencrypted data stored in an encrypted node. 218 // A holder for the unencrypted data stored in an encrypted node.
214 sync_pb::EntitySpecifics unencrypted_data_; 219 sync_pb::EntitySpecifics unencrypted_data_;
215 220
216 // Same as |unencrypted_data_|, but for legacy password encryption. 221 // Same as |unencrypted_data_|, but for legacy password encryption.
217 scoped_ptr<sync_pb::PasswordSpecificsData> password_data_; 222 scoped_ptr<sync_pb::PasswordSpecificsData> password_data_;
218 223
219 friend class SyncApiTest;
220 FRIEND_TEST_ALL_PREFIXES(SyncApiTest, GenerateSyncableHash);
221
222 DISALLOW_COPY_AND_ASSIGN(BaseNode); 224 DISALLOW_COPY_AND_ASSIGN(BaseNode);
223 }; 225 };
224 226
225 } // namespace sync_api 227 } // namespace sync_api
226 228
227 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_BASE_NODE_H_ 229 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_BASE_NODE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/internal_api/sync_manager.cc » ('j') | chrome/browser/sync/internal_api/sync_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698