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

Unified Diff: chrome/browser/prefs/pref_value_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/prefs/pref_value_store.h ('k') | chrome/browser/prefs/testing_pref_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_value_store.cc
===================================================================
--- chrome/browser/prefs/pref_value_store.cc (revision 118876)
+++ chrome/browser/prefs/pref_value_store.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -25,8 +25,10 @@
PrefValueStore* store,
PrefStore* pref_store,
PrefValueStore::PrefStoreType type) {
- if (pref_store_.get())
+ if (pref_store_.get()) {
pref_store_->RemoveObserver(this);
+ DCHECK_EQ(0U, pref_store_->NumberOfObservers());
+ }
type_ = type;
pref_value_store_ = store;
pref_store_ = pref_store;
@@ -185,6 +187,10 @@
effective_store == INVALID_STORE;
}
+void PrefValueStore::UpdateCommandLinePrefStore(PrefStore* command_line_prefs) {
+ InitPrefStore(COMMAND_LINE_STORE, command_line_prefs);
+}
+
bool PrefValueStore::PrefValueInStore(
const char* name,
PrefValueStore::PrefStoreType store) const {
« no previous file with comments | « chrome/browser/prefs/pref_value_store.h ('k') | chrome/browser/prefs/testing_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698