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

Side by Side Diff: services/preferences/tracked/segregated_pref_store.cc

Issue 2905903002: Delete the PreferenceMACs on profile deletion. (Closed)
Patch Set: Created 3 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/tracked/segregated_pref_store.h" 5 #include "services/preferences/tracked/segregated_pref_store.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 void SegregatedPrefStore::SchedulePendingLossyWrites() { 168 void SegregatedPrefStore::SchedulePendingLossyWrites() {
169 default_pref_store_->SchedulePendingLossyWrites(); 169 default_pref_store_->SchedulePendingLossyWrites();
170 selected_pref_store_->SchedulePendingLossyWrites(); 170 selected_pref_store_->SchedulePendingLossyWrites();
171 } 171 }
172 172
173 void SegregatedPrefStore::ClearMutableValues() { 173 void SegregatedPrefStore::ClearMutableValues() {
174 NOTIMPLEMENTED(); 174 NOTIMPLEMENTED();
175 } 175 }
176 176
177 void SegregatedPrefStore::CleanupForProfileDeletion() {
178 default_pref_store_->CleanupForProfileDeletion();
179 selected_pref_store_->CleanupForProfileDeletion();
180 }
181
177 SegregatedPrefStore::~SegregatedPrefStore() { 182 SegregatedPrefStore::~SegregatedPrefStore() {
178 default_pref_store_->RemoveObserver(&aggregating_observer_); 183 default_pref_store_->RemoveObserver(&aggregating_observer_);
179 selected_pref_store_->RemoveObserver(&aggregating_observer_); 184 selected_pref_store_->RemoveObserver(&aggregating_observer_);
180 } 185 }
181 186
182 PersistentPrefStore* SegregatedPrefStore::StoreForKey(const std::string& key) { 187 PersistentPrefStore* SegregatedPrefStore::StoreForKey(const std::string& key) {
183 return (base::ContainsKey(selected_preference_names_, key) 188 return (base::ContainsKey(selected_preference_names_, key)
184 ? selected_pref_store_ 189 ? selected_pref_store_
185 : default_pref_store_) 190 : default_pref_store_)
186 .get(); 191 .get();
187 } 192 }
188 193
189 const PersistentPrefStore* SegregatedPrefStore::StoreForKey( 194 const PersistentPrefStore* SegregatedPrefStore::StoreForKey(
190 const std::string& key) const { 195 const std::string& key) const {
191 return (base::ContainsKey(selected_preference_names_, key) 196 return (base::ContainsKey(selected_preference_names_, key)
192 ? selected_pref_store_ 197 ? selected_pref_store_
193 : default_pref_store_) 198 : default_pref_store_)
194 .get(); 199 .get();
195 } 200 }
OLDNEW
« components/prefs/pref_service.h ('K') | « services/preferences/tracked/segregated_pref_store.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698