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_CORE_IMPL_SYNC_ENCRYPTION_HANDLER_IMPL_H_ | 5 #ifndef COMPONENTS_SYNC_CORE_IMPL_SYNC_ENCRYPTION_HANDLER_IMPL_H_ |
6 #define COMPONENTS_SYNC_CORE_IMPL_SYNC_ENCRYPTION_HANDLER_IMPL_H_ | 6 #define COMPONENTS_SYNC_CORE_IMPL_SYNC_ENCRYPTION_HANDLER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
16 #include "base/threading/thread_checker.h" | 16 #include "base/threading/thread_checker.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "components/sync/base/cryptographer.h" | 18 #include "components/sync/base/cryptographer.h" |
19 #include "components/sync/core/sync_encryption_handler.h" | 19 #include "components/sync/core/sync_encryption_handler.h" |
20 #include "components/sync/syncable/nigori_handler.h" | 20 #include "components/sync/syncable/nigori_handler.h" |
21 | 21 |
22 namespace syncer { | 22 namespace syncer { |
23 | 23 |
24 class Encryptor; | 24 class Encryptor; |
25 struct UserShare; | 25 struct UserShare; |
26 class WriteNode; | 26 class WriteNode; |
27 class WriteTransaction; | 27 class WriteTransaction; |
| 28 enum class PassphraseType; |
28 | 29 |
29 // Sync encryption handler implementation. | 30 // Sync encryption handler implementation. |
30 // | 31 // |
31 // This class acts as the respository of all sync encryption state, and handles | 32 // This class acts as the respository of all sync encryption state, and handles |
32 // encryption related changes/queries coming from both the chrome side and | 33 // encryption related changes/queries coming from both the chrome side and |
33 // the sync side (via NigoriHandler). It is capable of modifying all sync data | 34 // the sync side (via NigoriHandler). It is capable of modifying all sync data |
34 // (re-encryption), updating the encrypted types, changing the encryption keys, | 35 // (re-encryption), updating the encrypted types, changing the encryption keys, |
35 // and creating/receiving nigori node updates. | 36 // and creating/receiving nigori node updates. |
36 // | 37 // |
37 // The class should live as long as the directory itself in order to ensure | 38 // The class should live as long as the directory itself in order to ensure |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 base::Time custom_passphrase_time_; | 317 base::Time custom_passphrase_time_; |
317 | 318 |
318 base::WeakPtrFactory<SyncEncryptionHandlerImpl> weak_ptr_factory_; | 319 base::WeakPtrFactory<SyncEncryptionHandlerImpl> weak_ptr_factory_; |
319 | 320 |
320 DISALLOW_COPY_AND_ASSIGN(SyncEncryptionHandlerImpl); | 321 DISALLOW_COPY_AND_ASSIGN(SyncEncryptionHandlerImpl); |
321 }; | 322 }; |
322 | 323 |
323 } // namespace syncer | 324 } // namespace syncer |
324 | 325 |
325 #endif // COMPONENTS_SYNC_CORE_IMPL_SYNC_ENCRYPTION_HANDLER_IMPL_H_ | 326 #endif // COMPONENTS_SYNC_CORE_IMPL_SYNC_ENCRYPTION_HANDLER_IMPL_H_ |
OLD | NEW |