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

Side by Side Diff: sync/syncable/nigori_util.h

Issue 10795018: [Sync] Remove unneeded 'using syncer::' lines and 'syncer::' scopings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fiix indent Created 8 years, 5 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
« no previous file with comments | « sync/syncable/mutable_entry.cc ('k') | sync/syncable/nigori_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 23 matching lines...) Expand all
34 // This method is similar to ProcessUnsyncedChangesForEncryption but does not 34 // This method is similar to ProcessUnsyncedChangesForEncryption but does not
35 // modify the data and does not care if data is unnecessarily encrypted. 35 // modify the data and does not care if data is unnecessarily encrypted.
36 bool VerifyUnsyncedChangesAreEncrypted( 36 bool VerifyUnsyncedChangesAreEncrypted(
37 BaseTransaction* const trans, 37 BaseTransaction* const trans,
38 ModelTypeSet encrypted_types); 38 ModelTypeSet encrypted_types);
39 39
40 // Processes all unsynced changes and ensures they are appropriately encrypted 40 // Processes all unsynced changes and ensures they are appropriately encrypted
41 // or unencrypted, based on |encrypted_types|. 41 // or unencrypted, based on |encrypted_types|.
42 bool ProcessUnsyncedChangesForEncryption( 42 bool ProcessUnsyncedChangesForEncryption(
43 WriteTransaction* const trans, 43 WriteTransaction* const trans,
44 syncer::Cryptographer* cryptographer); 44 Cryptographer* cryptographer);
45 45
46 // Returns true if the entry requires encryption but is not encrypted, false 46 // Returns true if the entry requires encryption but is not encrypted, false
47 // otherwise. Note: this does not check that already encrypted entries are 47 // otherwise. Note: this does not check that already encrypted entries are
48 // encrypted with the proper key. 48 // encrypted with the proper key.
49 bool EntryNeedsEncryption(ModelTypeSet encrypted_types, 49 bool EntryNeedsEncryption(ModelTypeSet encrypted_types,
50 const Entry& entry); 50 const Entry& entry);
51 51
52 // Same as EntryNeedsEncryption, but looks at specifics. 52 // Same as EntryNeedsEncryption, but looks at specifics.
53 bool SpecificsNeedsEncryption(ModelTypeSet encrypted_types, 53 bool SpecificsNeedsEncryption(ModelTypeSet encrypted_types,
54 const sync_pb::EntitySpecifics& specifics); 54 const sync_pb::EntitySpecifics& specifics);
55 55
56 // Verifies all data of type |type| is encrypted appropriately. 56 // Verifies all data of type |type| is encrypted appropriately.
57 bool VerifyDataTypeEncryptionForTest( 57 bool VerifyDataTypeEncryptionForTest(
58 BaseTransaction* const trans, 58 BaseTransaction* const trans,
59 syncer::Cryptographer* cryptographer, 59 Cryptographer* cryptographer,
60 ModelType type, 60 ModelType type,
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 syncer::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 } // namespace syncable 71 } // namespace syncable
72 } // namespace syncer 72 } // namespace syncer
73 73
74 #endif // SYNC_SYNCABLE_NIGORI_UTIL_H_ 74 #endif // SYNC_SYNCABLE_NIGORI_UTIL_H_
OLDNEW
« no previous file with comments | « sync/syncable/mutable_entry.cc ('k') | sync/syncable/nigori_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698