| 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(base::OnceClosure done_callback) override; | 63 void CommitPendingWrite(base::OnceClosure done_callback) override; |
| 64 void SchedulePendingLossyWrites() override; | 64 void SchedulePendingLossyWrites() override; |
| 65 void ClearMutableValues() override; | 65 void ClearMutableValues() override; |
| 66 void OnStoreDeletionFromDisk() 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 class InFlightWriteTrie; | 73 class InFlightWriteTrie; |
| 73 struct InFlightWrite; | 74 struct InFlightWrite; |
| 74 | 75 |
| 75 void OnConnect(mojom::PersistentPrefStoreConnectionPtr connection, | 76 void OnConnect(mojom::PersistentPrefStoreConnectionPtr connection, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 106 std::map<std::string, InFlightWriteTrie> in_flight_writes_tries_; | 107 std::map<std::string, InFlightWriteTrie> in_flight_writes_tries_; |
| 107 | 108 |
| 108 base::WeakPtrFactory<PersistentPrefStoreClient> weak_factory_; | 109 base::WeakPtrFactory<PersistentPrefStoreClient> weak_factory_; |
| 109 | 110 |
| 110 DISALLOW_COPY_AND_ASSIGN(PersistentPrefStoreClient); | 111 DISALLOW_COPY_AND_ASSIGN(PersistentPrefStoreClient); |
| 111 }; | 112 }; |
| 112 | 113 |
| 113 } // namespace prefs | 114 } // namespace prefs |
| 114 | 115 |
| 115 #endif // SERVICES_PREFERENCES_PUBLIC_CPP_PERSISTENT_PREF_STORE_CLIENT_H_ | 116 #endif // SERVICES_PREFERENCES_PUBLIC_CPP_PERSISTENT_PREF_STORE_CLIENT_H_ |
| OLD | NEW |