OLD | NEW |
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 "chrome/browser/prefs/overlay_user_pref_store.h" | 5 #include "base/prefs/overlay_user_pref_store.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 | 9 |
10 OverlayUserPrefStore::OverlayUserPrefStore( | 10 OverlayUserPrefStore::OverlayUserPrefStore( |
11 PersistentPrefStore* underlay) | 11 PersistentPrefStore* underlay) |
12 : underlay_(underlay) { | 12 : underlay_(underlay) { |
13 underlay_->AddObserver(this); | 13 underlay_->AddObserver(this); |
14 } | 14 } |
15 | 15 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 NamesMap::const_iterator i = | 177 NamesMap::const_iterator i = |
178 overlay_to_underlay_names_map_.find(overlay_key); | 178 overlay_to_underlay_names_map_.find(overlay_key); |
179 return i != overlay_to_underlay_names_map_.end() ? i->second : overlay_key; | 179 return i != overlay_to_underlay_names_map_.end() ? i->second : overlay_key; |
180 } | 180 } |
181 | 181 |
182 bool OverlayUserPrefStore::ShallBeStoredInOverlay( | 182 bool OverlayUserPrefStore::ShallBeStoredInOverlay( |
183 const std::string& key) const { | 183 const std::string& key) const { |
184 return overlay_to_underlay_names_map_.find(key) != | 184 return overlay_to_underlay_names_map_.find(key) != |
185 overlay_to_underlay_names_map_.end(); | 185 overlay_to_underlay_names_map_.end(); |
186 } | 186 } |
OLD | NEW |