| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 void SetValues(std::vector<mojom::PrefUpdatePtr> updates) override { | 55 void SetValues(std::vector<mojom::PrefUpdatePtr> updates) override { |
| 56 base::AutoReset<bool> scoped_call_in_progress(&write_in_progress_, true); | 56 base::AutoReset<bool> scoped_call_in_progress(&write_in_progress_, true); |
| 57 pref_store_->SetValues(std::move(updates)); | 57 pref_store_->SetValues(std::move(updates)); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void CommitPendingWrite() override { pref_store_->CommitPendingWrite(); } | 60 void CommitPendingWrite() override { pref_store_->CommitPendingWrite(); } |
| 61 void SchedulePendingLossyWrites() override { | 61 void SchedulePendingLossyWrites() override { |
| 62 pref_store_->SchedulePendingLossyWrites(); | 62 pref_store_->SchedulePendingLossyWrites(); |
| 63 } | 63 } |
| 64 void ClearMutableValues() override { pref_store_->ClearMutableValues(); } | 64 void ClearMutableValues() override { pref_store_->ClearMutableValues(); } |
| 65 void CleanupForProfileDeletion() override { |
| 66 pref_store_->CleanupForProfileDeletion(); |
| 67 } |
| 65 | 68 |
| 66 void OnConnectionError() { pref_store_->OnConnectionError(this); } | 69 void OnConnectionError() { pref_store_->OnConnectionError(this); } |
| 67 | 70 |
| 68 // Owns |this|. | 71 // Owns |this|. |
| 69 PersistentPrefStoreImpl* const pref_store_; | 72 PersistentPrefStoreImpl* const pref_store_; |
| 70 | 73 |
| 71 mojo::Binding<mojom::PersistentPrefStore> binding_; | 74 mojo::Binding<mojom::PersistentPrefStore> binding_; |
| 72 mojom::PrefStoreObserverPtr observer_; | 75 mojom::PrefStoreObserverPtr observer_; |
| 73 const ObservedPrefs observed_keys_; | 76 const ObservedPrefs observed_keys_; |
| 74 | 77 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 } | 179 } |
| 177 | 180 |
| 178 void PersistentPrefStoreImpl::SchedulePendingLossyWrites() { | 181 void PersistentPrefStoreImpl::SchedulePendingLossyWrites() { |
| 179 backing_pref_store_->SchedulePendingLossyWrites(); | 182 backing_pref_store_->SchedulePendingLossyWrites(); |
| 180 } | 183 } |
| 181 | 184 |
| 182 void PersistentPrefStoreImpl::ClearMutableValues() { | 185 void PersistentPrefStoreImpl::ClearMutableValues() { |
| 183 backing_pref_store_->ClearMutableValues(); | 186 backing_pref_store_->ClearMutableValues(); |
| 184 } | 187 } |
| 185 | 188 |
| 189 void PersistentPrefStoreImpl::CleanupForProfileDeletion() { |
| 190 backing_pref_store_->CleanupForProfileDeletion(); |
| 191 } |
| 192 |
| 186 void PersistentPrefStoreImpl::OnConnectionError(Connection* connection) { | 193 void PersistentPrefStoreImpl::OnConnectionError(Connection* connection) { |
| 187 connections_.erase(connection); | 194 connections_.erase(connection); |
| 188 } | 195 } |
| 189 | 196 |
| 190 } // namespace prefs | 197 } // namespace prefs |
| OLD | NEW |