OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 COMPONENTS_SYNC_SYNCABLE_NIGORI_HANDLER_H_ | 5 #ifndef COMPONENTS_SYNC_SYNCABLE_NIGORI_HANDLER_H_ |
6 #define COMPONENTS_SYNC_SYNCABLE_NIGORI_HANDLER_H_ | 6 #define COMPONENTS_SYNC_SYNCABLE_NIGORI_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "components/sync/base/model_type.h" | 10 #include "components/sync/base/model_type.h" |
11 #include "components/sync/base/sync_export.h" | |
12 | 11 |
13 namespace google { | 12 namespace google { |
14 namespace protobuf { | 13 namespace protobuf { |
15 template <typename T> | 14 template <typename T> |
16 class RepeatedPtrField; | 15 class RepeatedPtrField; |
17 } | 16 } |
18 } | 17 } |
19 | 18 |
20 namespace sync_pb { | 19 namespace sync_pb { |
21 class NigoriSpecifics; | 20 class NigoriSpecifics; |
22 } | 21 } |
23 | 22 |
24 namespace syncer { | 23 namespace syncer { |
25 namespace syncable { | 24 namespace syncable { |
26 | 25 |
27 class BaseTransaction; | 26 class BaseTransaction; |
28 | 27 |
29 // Sync internal interface for dealing with nigori node and querying | 28 // Sync internal interface for dealing with nigori node and querying |
30 // the current set of encrypted types. Not thread safe, so a sync transaction | 29 // the current set of encrypted types. Not thread safe, so a sync transaction |
31 // must be held by a caller whenever invoking methods. | 30 // must be held by a caller whenever invoking methods. |
32 class SYNC_EXPORT NigoriHandler { | 31 class NigoriHandler { |
33 public: | 32 public: |
34 NigoriHandler(); | 33 NigoriHandler(); |
35 virtual ~NigoriHandler(); | 34 virtual ~NigoriHandler(); |
36 | 35 |
37 // Apply a nigori node update, updating the internal encryption state | 36 // Apply a nigori node update, updating the internal encryption state |
38 // accordingly. | 37 // accordingly. |
39 virtual void ApplyNigoriUpdate(const sync_pb::NigoriSpecifics& nigori, | 38 virtual void ApplyNigoriUpdate(const sync_pb::NigoriSpecifics& nigori, |
40 syncable::BaseTransaction* const trans) = 0; | 39 syncable::BaseTransaction* const trans) = 0; |
41 | 40 |
42 // Store the current encrypt everything/encrypted types state into |nigori|. | 41 // Store the current encrypt everything/encrypted types state into |nigori|. |
(...skipping 13 matching lines...) Expand all Loading... |
56 | 55 |
57 // Returns the set of currently encrypted types. | 56 // Returns the set of currently encrypted types. |
58 virtual ModelTypeSet GetEncryptedTypes( | 57 virtual ModelTypeSet GetEncryptedTypes( |
59 syncable::BaseTransaction* const trans) const = 0; | 58 syncable::BaseTransaction* const trans) const = 0; |
60 }; | 59 }; |
61 | 60 |
62 } // namespace syncable | 61 } // namespace syncable |
63 } // namespace syncer | 62 } // namespace syncer |
64 | 63 |
65 #endif // COMPONENTS_SYNC_SYNCABLE_NIGORI_HANDLER_H_ | 64 #endif // COMPONENTS_SYNC_SYNCABLE_NIGORI_HANDLER_H_ |
OLD | NEW |