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

Side by Side Diff: chrome/browser/prefs/overlay_user_pref_store.cc

Issue 9251026: Reinitialize LocalState's CommandLinePrefStore after about_flags updates the command line. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix presubmit checks, no code change Created 8 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/prefs/overlay_user_pref_store.h ('k') | chrome/browser/prefs/pref_service.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 "chrome/browser/prefs/overlay_user_pref_store.h" 5 #include "chrome/browser/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(
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 void OverlayUserPrefStore::AddObserver(PrefStore::Observer* observer) { 24 void OverlayUserPrefStore::AddObserver(PrefStore::Observer* observer) {
25 observers_.AddObserver(observer); 25 observers_.AddObserver(observer);
26 } 26 }
27 27
28 void OverlayUserPrefStore::RemoveObserver(PrefStore::Observer* observer) { 28 void OverlayUserPrefStore::RemoveObserver(PrefStore::Observer* observer) {
29 observers_.RemoveObserver(observer); 29 observers_.RemoveObserver(observer);
30 } 30 }
31 31
32 size_t OverlayUserPrefStore::NumberOfObservers() const {
33 return observers_.size();
34 }
35
32 bool OverlayUserPrefStore::IsInitializationComplete() const { 36 bool OverlayUserPrefStore::IsInitializationComplete() const {
33 return underlay_->IsInitializationComplete(); 37 return underlay_->IsInitializationComplete();
34 } 38 }
35 39
36 PrefStore::ReadResult OverlayUserPrefStore::GetValue( 40 PrefStore::ReadResult OverlayUserPrefStore::GetValue(
37 const std::string& key, 41 const std::string& key,
38 const Value** result) const { 42 const Value** result) const {
39 // If the |key| shall NOT be stored in the overlay store, there must not 43 // If the |key| shall NOT be stored in the overlay store, there must not
40 // be an entry. 44 // be an entry.
41 DCHECK(ShallBeStoredInOverlay(key) || !overlay_.GetValue(key, NULL)); 45 DCHECK(ShallBeStoredInOverlay(key) || !overlay_.GetValue(key, NULL));
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 NamesMap::const_iterator i = 168 NamesMap::const_iterator i =
165 overlay_to_underlay_names_map_.find(overlay_key); 169 overlay_to_underlay_names_map_.find(overlay_key);
166 return i != overlay_to_underlay_names_map_.end() ? i->second : overlay_key; 170 return i != overlay_to_underlay_names_map_.end() ? i->second : overlay_key;
167 } 171 }
168 172
169 bool OverlayUserPrefStore::ShallBeStoredInOverlay( 173 bool OverlayUserPrefStore::ShallBeStoredInOverlay(
170 const std::string& key) const { 174 const std::string& key) const {
171 return overlay_to_underlay_names_map_.find(key) != 175 return overlay_to_underlay_names_map_.find(key) !=
172 overlay_to_underlay_names_map_.end(); 176 overlay_to_underlay_names_map_.end();
173 } 177 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/overlay_user_pref_store.h ('k') | chrome/browser/prefs/pref_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698