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

Side by Side Diff: components/user_prefs/tracked/segregated_pref_store.cc

Issue 2231753002: components: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more call site Created 4 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/url_matcher/url_matcher.cc ('k') | components/variations/study_filtering.cc » ('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 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 "components/user_prefs/tracked/segregated_pref_store.h" 5 #include "components/user_prefs/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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 void SegregatedPrefStore::ClearMutableValues() { 159 void SegregatedPrefStore::ClearMutableValues() {
160 NOTIMPLEMENTED(); 160 NOTIMPLEMENTED();
161 } 161 }
162 162
163 SegregatedPrefStore::~SegregatedPrefStore() { 163 SegregatedPrefStore::~SegregatedPrefStore() {
164 default_pref_store_->RemoveObserver(&aggregating_observer_); 164 default_pref_store_->RemoveObserver(&aggregating_observer_);
165 selected_pref_store_->RemoveObserver(&aggregating_observer_); 165 selected_pref_store_->RemoveObserver(&aggregating_observer_);
166 } 166 }
167 167
168 PersistentPrefStore* SegregatedPrefStore::StoreForKey(const std::string& key) { 168 PersistentPrefStore* SegregatedPrefStore::StoreForKey(const std::string& key) {
169 return (ContainsKey(selected_preference_names_, key) 169 return (base::ContainsKey(selected_preference_names_, key)
170 ? selected_pref_store_ 170 ? selected_pref_store_
171 : default_pref_store_).get(); 171 : default_pref_store_)
172 .get();
172 } 173 }
173 174
174 const PersistentPrefStore* SegregatedPrefStore::StoreForKey( 175 const PersistentPrefStore* SegregatedPrefStore::StoreForKey(
175 const std::string& key) const { 176 const std::string& key) const {
176 return (ContainsKey(selected_preference_names_, key) 177 return (base::ContainsKey(selected_preference_names_, key)
177 ? selected_pref_store_ 178 ? selected_pref_store_
178 : default_pref_store_).get(); 179 : default_pref_store_)
180 .get();
179 } 181 }
OLDNEW
« no previous file with comments | « components/url_matcher/url_matcher.cc ('k') | components/variations/study_filtering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698