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

Side by Side Diff: components/prefs/pref_service.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
« no previous file with comments | « components/prefs/pref_service.h ('k') | components/prefs/testing_pref_store.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/prefs/pref_service.h" 5 #include "components/prefs/pref_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 NOTREACHED() << "Trying to clear an unregistered pref: " << path; 367 NOTREACHED() << "Trying to clear an unregistered pref: " << path;
368 return; 368 return;
369 } 369 }
370 user_pref_store_->RemoveValue(path, GetWriteFlags(pref)); 370 user_pref_store_->RemoveValue(path, GetWriteFlags(pref));
371 } 371 }
372 372
373 void PrefService::ClearMutableValues() { 373 void PrefService::ClearMutableValues() {
374 user_pref_store_->ClearMutableValues(); 374 user_pref_store_->ClearMutableValues();
375 } 375 }
376 376
377 void PrefService::OnStoreDeletionFromDisk() {
378 user_pref_store_->OnStoreDeletionFromDisk();
379 }
380
377 void PrefService::Set(const std::string& path, const base::Value& value) { 381 void PrefService::Set(const std::string& path, const base::Value& value) {
378 SetUserPrefValue(path, value.CreateDeepCopy()); 382 SetUserPrefValue(path, value.CreateDeepCopy());
379 } 383 }
380 384
381 void PrefService::SetBoolean(const std::string& path, bool value) { 385 void PrefService::SetBoolean(const std::string& path, bool value) {
382 SetUserPrefValue(path, base::MakeUnique<base::Value>(value)); 386 SetUserPrefValue(path, base::MakeUnique<base::Value>(value));
383 } 387 }
384 388
385 void PrefService::SetInteger(const std::string& path, int value) { 389 void PrefService::SetInteger(const std::string& path, int value) {
386 SetUserPrefValue(path, base::MakeUnique<base::Value>(value)); 390 SetUserPrefValue(path, base::MakeUnique<base::Value>(value));
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 DCHECK(found_value->IsType(default_type)); 617 DCHECK(found_value->IsType(default_type));
614 return found_value; 618 return found_value;
615 } else { 619 } else {
616 // Every registered preference has at least a default value. 620 // Every registered preference has at least a default value.
617 NOTREACHED() << "no valid value found for registered pref " << path; 621 NOTREACHED() << "no valid value found for registered pref " << path;
618 } 622 }
619 } 623 }
620 624
621 return NULL; 625 return NULL;
622 } 626 }
OLDNEW
« no previous file with comments | « components/prefs/pref_service.h ('k') | components/prefs/testing_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698