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/syncable/nigori_util.h

Issue 10827266: [Sync] Add SyncEncryptionHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests 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 // Various utility methods for nigori-based multi-type encryption. 5 // Various utility methods for nigori-based multi-type encryption.
6 6
7 #ifndef SYNC_SYNCABLE_NIGORI_UTIL_H_ 7 #ifndef SYNC_SYNCABLE_NIGORI_UTIL_H_
8 #define SYNC_SYNCABLE_NIGORI_UTIL_H_ 8 #define SYNC_SYNCABLE_NIGORI_UTIL_H_
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 bool is_encrypted) WARN_UNUSED_RESULT; 61 bool is_encrypted) WARN_UNUSED_RESULT;
62 62
63 // Stores |new_specifics| into |entry|, encrypting if necessary. 63 // Stores |new_specifics| into |entry|, encrypting if necessary.
64 // Returns false if an error encrypting occurred (does not modify |entry|). 64 // Returns false if an error encrypting occurred (does not modify |entry|).
65 // Note: gracefully handles new_specifics aliasing with entry->Get(SPECIFICS). 65 // Note: gracefully handles new_specifics aliasing with entry->Get(SPECIFICS).
66 bool UpdateEntryWithEncryption( 66 bool UpdateEntryWithEncryption(
67 Cryptographer* cryptographer, 67 Cryptographer* cryptographer,
68 const sync_pb::EntitySpecifics& new_specifics, 68 const sync_pb::EntitySpecifics& new_specifics,
69 MutableEntry* entry); 69 MutableEntry* entry);
70 70
71 // Updates |nigori| to match the encryption state specified by |encrypted_types|
72 // and |encrypt_everything|.
73 void UpdateNigoriFromEncryptedTypes(ModelTypeSet encrypted_types,
74 bool encrypt_everything,
75 sync_pb::NigoriSpecifics* nigori);
76
71 } // namespace syncable 77 } // namespace syncable
72 } // namespace syncer 78 } // namespace syncer
73 79
74 #endif // SYNC_SYNCABLE_NIGORI_UTIL_H_ 80 #endif // SYNC_SYNCABLE_NIGORI_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698