| OLD | NEW |
| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // Have to friend the test class as well to allow member functions to access | 211 // Have to friend the test class as well to allow member functions to access |
| 212 // protected/private BaseNode methods. | 212 // protected/private BaseNode methods. |
| 213 friend class SyncManagerTest; | 213 friend class SyncManagerTest; |
| 214 FRIEND_TEST_ALL_PREFIXES(SyncApiTest, GenerateSyncableHash); | 214 FRIEND_TEST_ALL_PREFIXES(SyncApiTest, GenerateSyncableHash); |
| 215 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, UpdateEntryWithEncryption); | 215 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, UpdateEntryWithEncryption); |
| 216 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, |
| 217 UpdatePasswordSetEntitySpecificsNoChange); |
| 218 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, UpdatePasswordSetPasswordSpecifics); |
| 219 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, UpdatePasswordNewPassphrase); |
| 220 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, UpdatePasswordReencryptEverything); |
| 216 | 221 |
| 217 void* operator new(size_t size); // Node is meant for stack use only. | 222 void* operator new(size_t size); // Node is meant for stack use only. |
| 218 | 223 |
| 219 // A holder for the unencrypted data stored in an encrypted node. | 224 // A holder for the unencrypted data stored in an encrypted node. |
| 220 sync_pb::EntitySpecifics unencrypted_data_; | 225 sync_pb::EntitySpecifics unencrypted_data_; |
| 221 | 226 |
| 222 // Same as |unencrypted_data_|, but for legacy password encryption. | 227 // Same as |unencrypted_data_|, but for legacy password encryption. |
| 223 scoped_ptr<sync_pb::PasswordSpecificsData> password_data_; | 228 scoped_ptr<sync_pb::PasswordSpecificsData> password_data_; |
| 224 | 229 |
| 225 DISALLOW_COPY_AND_ASSIGN(BaseNode); | 230 DISALLOW_COPY_AND_ASSIGN(BaseNode); |
| 226 }; | 231 }; |
| 227 | 232 |
| 228 } // namespace sync_api | 233 } // namespace sync_api |
| 229 | 234 |
| 230 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_BASE_NODE_H_ | 235 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_BASE_NODE_H_ |
| OLD | NEW |