| 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 | 11 |
| 12 namespace google { | 12 namespace google { |
| 13 namespace protobuf { | 13 namespace protobuf { |
| 14 template <typename T> | 14 template <typename T> |
| 15 class RepeatedPtrField; | 15 class RepeatedPtrField; |
| 16 } | 16 } |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace sync_pb { | 19 namespace sync_pb { |
| 20 class NigoriSpecifics; | 20 class NigoriSpecifics; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace syncer { | 23 namespace syncer { |
| 24 |
| 25 enum class PassphraseType; |
| 26 |
| 24 namespace syncable { | 27 namespace syncable { |
| 25 | 28 |
| 26 class BaseTransaction; | 29 class BaseTransaction; |
| 27 | 30 |
| 28 // Sync internal interface for dealing with nigori node and querying | 31 // Sync internal interface for dealing with nigori node and querying |
| 29 // the current set of encrypted types. Not thread safe, so a sync transaction | 32 // the current set of encrypted types. Not thread safe, so a sync transaction |
| 30 // must be held by a caller whenever invoking methods. | 33 // must be held by a caller whenever invoking methods. |
| 31 class NigoriHandler { | 34 class NigoriHandler { |
| 32 public: | 35 public: |
| 33 NigoriHandler(); | 36 NigoriHandler(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 49 | 52 |
| 50 // Set the keystore keys the server returned for this account. | 53 // Set the keystore keys the server returned for this account. |
| 51 // Returns true on success, false otherwise. | 54 // Returns true on success, false otherwise. |
| 52 virtual bool SetKeystoreKeys( | 55 virtual bool SetKeystoreKeys( |
| 53 const google::protobuf::RepeatedPtrField<std::string>& keys, | 56 const google::protobuf::RepeatedPtrField<std::string>& keys, |
| 54 syncable::BaseTransaction* const trans) = 0; | 57 syncable::BaseTransaction* const trans) = 0; |
| 55 | 58 |
| 56 // Returns the set of currently encrypted types. | 59 // Returns the set of currently encrypted types. |
| 57 virtual ModelTypeSet GetEncryptedTypes( | 60 virtual ModelTypeSet GetEncryptedTypes( |
| 58 syncable::BaseTransaction* const trans) const = 0; | 61 syncable::BaseTransaction* const trans) const = 0; |
| 62 |
| 63 // Returns current value for the passphrase type. |
| 64 virtual PassphraseType GetPassphraseType( |
| 65 syncable::BaseTransaction* const trans) const = 0; |
| 59 }; | 66 }; |
| 60 | 67 |
| 61 } // namespace syncable | 68 } // namespace syncable |
| 62 } // namespace syncer | 69 } // namespace syncer |
| 63 | 70 |
| 64 #endif // COMPONENTS_SYNC_SYNCABLE_NIGORI_HANDLER_H_ | 71 #endif // COMPONENTS_SYNC_SYNCABLE_NIGORI_HANDLER_H_ |
| OLD | NEW |