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

Side by Side Diff: sync/util/cryptographer.h

Issue 10855037: [Sync] Add history delete directive type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_UTIL_CRYPTOGRAPHER_H_ 5 #ifndef SYNC_UTIL_CRYPTOGRAPHER_H_
6 #define SYNC_UTIL_CRYPTOGRAPHER_H_ 6 #define SYNC_UTIL_CRYPTOGRAPHER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 void set_encrypt_everything(); 212 void set_encrypt_everything();
213 bool encrypt_everything() const; 213 bool encrypt_everything() const;
214 214
215 // Return the set of encrypted types. 215 // Return the set of encrypted types.
216 ModelTypeSet GetEncryptedTypes() const; 216 ModelTypeSet GetEncryptedTypes() const;
217 217
218 // Forwards to MergeEncryptedTypes. 218 // Forwards to MergeEncryptedTypes.
219 void MergeEncryptedTypesForTest(ModelTypeSet encrypted_types); 219 void MergeEncryptedTypesForTest(ModelTypeSet encrypted_types);
220 220
221 private: 221 private:
222 FRIEND_TEST_ALL_PREFIXES(SyncCryptographerTest, PackUnpack); 222 FRIEND_TEST_ALL_PREFIXES(CryptographerTest, PackUnpack);
223 typedef std::map<std::string, linked_ptr<const Nigori> > NigoriMap; 223 typedef std::map<std::string, linked_ptr<const Nigori> > NigoriMap;
224 224
225 // Merges the given set of encrypted types with the existing set and emits a 225 // Merges the given set of encrypted types with the existing set and emits a
226 // notification if necessary. 226 // notification if necessary.
227 void MergeEncryptedTypes(ModelTypeSet encrypted_types); 227 void MergeEncryptedTypes(ModelTypeSet encrypted_types);
228 228
229 void EmitEncryptedTypesChangedNotification(); 229 void EmitEncryptedTypesChangedNotification();
230 230
231 // Decrypts |encrypted| and uses its contents to initialize Nigori instances. 231 // Decrypts |encrypted| and uses its contents to initialize Nigori instances.
232 // Returns true unless decryption of |encrypted| fails. The caller is 232 // Returns true unless decryption of |encrypted| fails. The caller is
(...skipping 27 matching lines...) Expand all
260 260
261 ModelTypeSet encrypted_types_; 261 ModelTypeSet encrypted_types_;
262 bool encrypt_everything_; 262 bool encrypt_everything_;
263 263
264 DISALLOW_COPY_AND_ASSIGN(Cryptographer); 264 DISALLOW_COPY_AND_ASSIGN(Cryptographer);
265 }; 265 };
266 266
267 } // namespace syncer 267 } // namespace syncer
268 268
269 #endif // SYNC_UTIL_CRYPTOGRAPHER_H_ 269 #endif // SYNC_UTIL_CRYPTOGRAPHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698