| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 SERVICES_PREFERENCES_PUBLIC_CPP_PERSISTENT_PREF_STORE_CLIENT_H_ | 5 #ifndef SERVICES_PREFERENCES_PUBLIC_CPP_PERSISTENT_PREF_STORE_CLIENT_H_ |
| 6 #define SERVICES_PREFERENCES_PUBLIC_CPP_PERSISTENT_PREF_STORE_CLIENT_H_ | 6 #define SERVICES_PREFERENCES_PUBLIC_CPP_PERSISTENT_PREF_STORE_CLIENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 uint32_t flags) override; | 56 uint32_t flags) override; |
| 57 | 57 |
| 58 // PersistentPrefStore: | 58 // PersistentPrefStore: |
| 59 bool ReadOnly() const override; | 59 bool ReadOnly() const override; |
| 60 PrefReadError GetReadError() const override; | 60 PrefReadError GetReadError() const override; |
| 61 PrefReadError ReadPrefs() override; | 61 PrefReadError ReadPrefs() override; |
| 62 void ReadPrefsAsync(ReadErrorDelegate* error_delegate) override; | 62 void ReadPrefsAsync(ReadErrorDelegate* error_delegate) override; |
| 63 void CommitPendingWrite() override; | 63 void CommitPendingWrite() override; |
| 64 void SchedulePendingLossyWrites() override; | 64 void SchedulePendingLossyWrites() override; |
| 65 void ClearMutableValues() override; | 65 void ClearMutableValues() override; |
| 66 void CleanupForProfileDeletion() override; |
| 66 | 67 |
| 67 protected: | 68 protected: |
| 68 // base::RefCounted<PrefStore>: | 69 // base::RefCounted<PrefStore>: |
| 69 ~PersistentPrefStoreClient() override; | 70 ~PersistentPrefStoreClient() override; |
| 70 | 71 |
| 71 private: | 72 private: |
| 72 void OnConnect(mojom::PersistentPrefStoreConnectionPtr connection, | 73 void OnConnect(mojom::PersistentPrefStoreConnectionPtr connection, |
| 73 std::unordered_map<PrefValueStore::PrefStoreType, | 74 std::unordered_map<PrefValueStore::PrefStoreType, |
| 74 prefs::mojom::PrefStoreConnectionPtr> | 75 prefs::mojom::PrefStoreConnectionPtr> |
| 75 other_pref_stores); | 76 other_pref_stores); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 91 std::vector<PrefValueStore::PrefStoreType> already_connected_types_; | 92 std::vector<PrefValueStore::PrefStoreType> already_connected_types_; |
| 92 | 93 |
| 93 base::WeakPtrFactory<PersistentPrefStoreClient> weak_factory_; | 94 base::WeakPtrFactory<PersistentPrefStoreClient> weak_factory_; |
| 94 | 95 |
| 95 DISALLOW_COPY_AND_ASSIGN(PersistentPrefStoreClient); | 96 DISALLOW_COPY_AND_ASSIGN(PersistentPrefStoreClient); |
| 96 }; | 97 }; |
| 97 | 98 |
| 98 } // namespace prefs | 99 } // namespace prefs |
| 99 | 100 |
| 100 #endif // SERVICES_PREFERENCES_PUBLIC_CPP_PERSISTENT_PREF_STORE_CLIENT_H_ | 101 #endif // SERVICES_PREFERENCES_PUBLIC_CPP_PERSISTENT_PREF_STORE_CLIENT_H_ |
| OLD | NEW |