Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: services/preferences/public/cpp/persistent_pref_store_client.cc

Issue 2905903002: Delete the PreferenceMACs on profile deletion. (Closed)
Patch Set: Update comments Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/public/cpp/persistent_pref_store_client.h" 5 #include "services/preferences/public/cpp/persistent_pref_store_client.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "components/prefs/pref_registry.h" 8 #include "components/prefs/pref_registry.h"
9 #include "mojo/common/values.mojom.h" 9 #include "mojo/common/values.mojom.h"
10 #include "mojo/common/values_struct_traits.h" 10 #include "mojo/common/values_struct_traits.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 void PersistentPrefStoreClient::SchedulePendingLossyWrites() { 236 void PersistentPrefStoreClient::SchedulePendingLossyWrites() {
237 DCHECK(pref_store_); 237 DCHECK(pref_store_);
238 return pref_store_->SchedulePendingLossyWrites(); 238 return pref_store_->SchedulePendingLossyWrites();
239 } 239 }
240 240
241 void PersistentPrefStoreClient::ClearMutableValues() { 241 void PersistentPrefStoreClient::ClearMutableValues() {
242 DCHECK(pref_store_); 242 DCHECK(pref_store_);
243 return pref_store_->ClearMutableValues(); 243 return pref_store_->ClearMutableValues();
244 } 244 }
245 245
246 void PersistentPrefStoreClient::OnStoreDeletionFromDisk() {
247 DCHECK(pref_store_);
248 return pref_store_->OnStoreDeletionFromDisk();
249 }
250
246 PersistentPrefStoreClient::~PersistentPrefStoreClient() { 251 PersistentPrefStoreClient::~PersistentPrefStoreClient() {
247 if (!pref_store_) 252 if (!pref_store_)
248 return; 253 return;
249 254
250 CommitPendingWrite(base::OnceClosure()); 255 CommitPendingWrite(base::OnceClosure());
251 } 256 }
252 257
253 void PersistentPrefStoreClient::QueueWrite( 258 void PersistentPrefStoreClient::QueueWrite(
254 const std::string& key, 259 const std::string& key,
255 std::set<std::vector<std::string>> path_components, 260 std::set<std::vector<std::string>> path_components,
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 auto decision = it->second.Lookup(path.begin(), path.end()); 372 auto decision = it->second.Lookup(path.begin(), path.end());
368 if (decision == InFlightWriteTrie::Decision::kAllow) { 373 if (decision == InFlightWriteTrie::Decision::kAllow) {
369 return false; 374 return false;
370 } 375 }
371 if (decision == InFlightWriteTrie::Decision::kResolve) 376 if (decision == InFlightWriteTrie::Decision::kResolve)
372 pref_store_->RequestValue(key, path); 377 pref_store_->RequestValue(key, path);
373 return true; 378 return true;
374 } 379 }
375 380
376 } // namespace prefs 381 } // namespace prefs
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698