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