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

Side by Side Diff: services/preferences/tracked/segregated_pref_store.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 | « services/preferences/tracked/segregated_pref_store.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/barrier_closure.h" 9 #include "base/barrier_closure.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 void SegregatedPrefStore::SchedulePendingLossyWrites() { 172 void SegregatedPrefStore::SchedulePendingLossyWrites() {
173 default_pref_store_->SchedulePendingLossyWrites(); 173 default_pref_store_->SchedulePendingLossyWrites();
174 selected_pref_store_->SchedulePendingLossyWrites(); 174 selected_pref_store_->SchedulePendingLossyWrites();
175 } 175 }
176 176
177 void SegregatedPrefStore::ClearMutableValues() { 177 void SegregatedPrefStore::ClearMutableValues() {
178 NOTIMPLEMENTED(); 178 NOTIMPLEMENTED();
179 } 179 }
180 180
181 void SegregatedPrefStore::OnStoreDeletionFromDisk() {
182 default_pref_store_->OnStoreDeletionFromDisk();
183 selected_pref_store_->OnStoreDeletionFromDisk();
184 }
185
181 SegregatedPrefStore::~SegregatedPrefStore() { 186 SegregatedPrefStore::~SegregatedPrefStore() {
182 default_pref_store_->RemoveObserver(&aggregating_observer_); 187 default_pref_store_->RemoveObserver(&aggregating_observer_);
183 selected_pref_store_->RemoveObserver(&aggregating_observer_); 188 selected_pref_store_->RemoveObserver(&aggregating_observer_);
184 } 189 }
185 190
186 PersistentPrefStore* SegregatedPrefStore::StoreForKey(const std::string& key) { 191 PersistentPrefStore* SegregatedPrefStore::StoreForKey(const std::string& key) {
187 return (base::ContainsKey(selected_preference_names_, key) 192 return (base::ContainsKey(selected_preference_names_, key)
188 ? selected_pref_store_ 193 ? selected_pref_store_
189 : default_pref_store_) 194 : default_pref_store_)
190 .get(); 195 .get();
191 } 196 }
192 197
193 const PersistentPrefStore* SegregatedPrefStore::StoreForKey( 198 const PersistentPrefStore* SegregatedPrefStore::StoreForKey(
194 const std::string& key) const { 199 const std::string& key) const {
195 return (base::ContainsKey(selected_preference_names_, key) 200 return (base::ContainsKey(selected_preference_names_, key)
196 ? selected_pref_store_ 201 ? selected_pref_store_
197 : default_pref_store_) 202 : default_pref_store_)
198 .get(); 203 .get();
199 } 204 }
OLDNEW
« no previous file with comments | « 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