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

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

Issue 7587009: sync: add DEPS files to subdirs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix include Created 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 // Various utility methods for nigory-based multi-type encryption.
6
7 #ifndef CHROME_BROWSER_SYNC_SYNCABLE_NIGORI_UTIL_H_
8 #define CHROME_BROWSER_SYNC_SYNCABLE_NIGORI_UTIL_H_
9 #pragma once
10
11 #include "chrome/browser/sync/protocol/nigori_specifics.pb.h"
12 #include "chrome/browser/sync/syncable/model_type.h"
13
14 namespace browser_sync {
15 class Cryptographer;
16 }
17
18 namespace syncable {
19
20 const char kEncryptedString[] = "encrypted";
21
22 class BaseTransaction;
23 class ReadTransaction;
24 class WriteTransaction;
25
26 // Set the encrypted datatypes on the nigori node.
27 void FillNigoriEncryptedTypes(const ModelTypeSet& types,
28 sync_pb::NigoriSpecifics* nigori);
29
30 // Check if our unsyced changes are encrypted if they need to be based on
31 // |encrypted_types|.
32 // Returns: true if all unsynced data that should be encrypted is.
33 // false if some unsynced changes need to be encrypted.
34 // This method is similar to ProcessUnsyncedChangesForEncryption but does not
35 // modify the data and does not care if data is unnecessarily encrypted.
36 bool VerifyUnsyncedChangesAreEncrypted(
37 BaseTransaction* const trans,
38 const ModelTypeSet& encrypted_types);
39
40 // Processes all unsynced changes and ensures they are appropriately encrypted
41 // or unencrypted, based on |encrypted_types|.
42 bool ProcessUnsyncedChangesForEncryption(
43 WriteTransaction* const trans,
44 browser_sync::Cryptographer* cryptographer);
45
46 // Verifies all data of type |type| is encrypted appropriately.
47 bool VerifyDataTypeEncryption(BaseTransaction* const trans,
48 browser_sync::Cryptographer* cryptographer,
49 ModelType type,
50 bool is_encrypted);
51
52 } // namespace syncable
53
54 #endif // CHROME_BROWSER_SYNC_SYNCABLE_NIGORI_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/syncable/directory_manager.cc ('k') | chrome/browser/sync/syncable/nigori_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698