| 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 #include "services/preferences/persistent_pref_store_impl.h" | 5 #include "services/preferences/persistent_pref_store_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 observer_->OnPrefsChanged(std::move(updates)); | 129 observer_->OnPrefsChanged(std::move(updates)); |
| 130 } | 130 } |
| 131 | 131 |
| 132 void CommitPendingWrite(CommitPendingWriteCallback done_callback) override { | 132 void CommitPendingWrite(CommitPendingWriteCallback done_callback) override { |
| 133 pref_store_->CommitPendingWrite(std::move(done_callback)); | 133 pref_store_->CommitPendingWrite(std::move(done_callback)); |
| 134 } | 134 } |
| 135 void SchedulePendingLossyWrites() override { | 135 void SchedulePendingLossyWrites() override { |
| 136 pref_store_->SchedulePendingLossyWrites(); | 136 pref_store_->SchedulePendingLossyWrites(); |
| 137 } | 137 } |
| 138 void ClearMutableValues() override { pref_store_->ClearMutableValues(); } | 138 void ClearMutableValues() override { pref_store_->ClearMutableValues(); } |
| 139 void OnStoreDeletionFromDisk() override { |
| 140 pref_store_->OnStoreDeletionFromDisk(); |
| 141 } |
| 139 | 142 |
| 140 void OnConnectionError() { pref_store_->OnConnectionError(this); } | 143 void OnConnectionError() { pref_store_->OnConnectionError(this); } |
| 141 | 144 |
| 142 // Owns |this|. | 145 // Owns |this|. |
| 143 PersistentPrefStoreImpl* const pref_store_; | 146 PersistentPrefStoreImpl* const pref_store_; |
| 144 | 147 |
| 145 mojo::Binding<mojom::PersistentPrefStore> binding_; | 148 mojo::Binding<mojom::PersistentPrefStore> binding_; |
| 146 mojom::PrefStoreObserverPtr observer_; | 149 mojom::PrefStoreObserverPtr observer_; |
| 147 const ObservedPrefs observed_keys_; | 150 const ObservedPrefs observed_keys_; |
| 148 | 151 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 } | 259 } |
| 257 | 260 |
| 258 void PersistentPrefStoreImpl::SchedulePendingLossyWrites() { | 261 void PersistentPrefStoreImpl::SchedulePendingLossyWrites() { |
| 259 backing_pref_store_->SchedulePendingLossyWrites(); | 262 backing_pref_store_->SchedulePendingLossyWrites(); |
| 260 } | 263 } |
| 261 | 264 |
| 262 void PersistentPrefStoreImpl::ClearMutableValues() { | 265 void PersistentPrefStoreImpl::ClearMutableValues() { |
| 263 backing_pref_store_->ClearMutableValues(); | 266 backing_pref_store_->ClearMutableValues(); |
| 264 } | 267 } |
| 265 | 268 |
| 269 void PersistentPrefStoreImpl::OnStoreDeletionFromDisk() { |
| 270 backing_pref_store_->OnStoreDeletionFromDisk(); |
| 271 } |
| 272 |
| 266 void PersistentPrefStoreImpl::OnConnectionError(Connection* connection) { | 273 void PersistentPrefStoreImpl::OnConnectionError(Connection* connection) { |
| 267 connections_.erase(connection); | 274 connections_.erase(connection); |
| 268 } | 275 } |
| 269 | 276 |
| 270 } // namespace prefs | 277 } // namespace prefs |
| OLD | NEW |