| OLD | NEW |
| 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 #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/internal_api/public/base/model_type.h" | 8 #include "sync/internal_api/public/base/model_type.h" |
| 9 | 9 |
| 10 namespace sync_pb { | 10 namespace sync_pb { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // accordingly. | 28 // accordingly. |
| 29 virtual void ApplyNigoriUpdate( | 29 virtual void ApplyNigoriUpdate( |
| 30 const sync_pb::NigoriSpecifics& nigori, | 30 const sync_pb::NigoriSpecifics& nigori, |
| 31 syncable::BaseTransaction* const trans) = 0; | 31 syncable::BaseTransaction* const trans) = 0; |
| 32 | 32 |
| 33 // Store the current encrypt everything/encrypted types state into |nigori|. | 33 // Store the current encrypt everything/encrypted types state into |nigori|. |
| 34 virtual void UpdateNigoriFromEncryptedTypes( | 34 virtual void UpdateNigoriFromEncryptedTypes( |
| 35 sync_pb::NigoriSpecifics* nigori, | 35 sync_pb::NigoriSpecifics* nigori, |
| 36 syncable::BaseTransaction* const trans) const = 0; | 36 syncable::BaseTransaction* const trans) const = 0; |
| 37 | 37 |
| 38 // Whether a keystore key needs to be requested from the sync server. |
| 39 virtual bool NeedKeystoreKey( |
| 40 syncable::BaseTransaction* const trans) const = 0; |
| 41 |
| 42 // Set the keystore key the server returned for this account. |
| 43 // Returns true on success, false otherwise. |
| 44 virtual bool SetKeystoreKey( |
| 45 const std::string& key, |
| 46 syncable::BaseTransaction* const trans) = 0; |
| 47 |
| 38 // Returns the set of currently encrypted types. | 48 // Returns the set of currently encrypted types. |
| 39 virtual ModelTypeSet GetEncryptedTypes( | 49 virtual ModelTypeSet GetEncryptedTypes( |
| 40 syncable::BaseTransaction* const trans) const = 0; | 50 syncable::BaseTransaction* const trans) const = 0; |
| 41 }; | 51 }; |
| 42 | 52 |
| 43 } // namespace syncable | 53 } // namespace syncable |
| 44 } // namespace syncer | 54 } // namespace syncer |
| 45 | 55 |
| 46 #endif // SYNC_SYNCABLE_NIGORI_HANDLER_H_ | 56 #endif // SYNC_SYNCABLE_NIGORI_HANDLER_H_ |
| OLD | NEW |