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

Side by Side Diff: chrome/browser/policy/configuration_policy_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
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/policy/configuration_policy_pref_store.h" 5 #include "chrome/browser/policy/configuration_policy_pref_store.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 void ConfigurationPolicyPrefStore::AddObserver(PrefStore::Observer* observer) { 59 void ConfigurationPolicyPrefStore::AddObserver(PrefStore::Observer* observer) {
60 observers_.AddObserver(observer); 60 observers_.AddObserver(observer);
61 } 61 }
62 62
63 void ConfigurationPolicyPrefStore::RemoveObserver( 63 void ConfigurationPolicyPrefStore::RemoveObserver(
64 PrefStore::Observer* observer) { 64 PrefStore::Observer* observer) {
65 observers_.RemoveObserver(observer); 65 observers_.RemoveObserver(observer);
66 } 66 }
67 67
68 size_t ConfigurationPolicyPrefStore::NumberOfObservers() const {
69 return observers_.size();
70 }
71
68 bool ConfigurationPolicyPrefStore::IsInitializationComplete() const { 72 bool ConfigurationPolicyPrefStore::IsInitializationComplete() const {
69 return initialization_complete_; 73 return initialization_complete_;
70 } 74 }
71 75
72 PrefStore::ReadResult 76 PrefStore::ReadResult
73 ConfigurationPolicyPrefStore::GetValue(const std::string& key, 77 ConfigurationPolicyPrefStore::GetValue(const std::string& key,
74 const Value** value) const { 78 const Value** value) const {
75 const Value* stored_value = NULL; 79 const Value* stored_value = NULL;
76 if (!prefs_.get() || !prefs_->GetValue(key, &stored_value)) 80 if (!prefs_.get() || !prefs_->GetValue(key, &stored_value))
77 return PrefStore::READ_NO_VALUE; 81 return PrefStore::READ_NO_VALUE;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // issue during startup. 167 // issue during startup.
164 BrowserThread::PostTask(BrowserThread::UI, 168 BrowserThread::PostTask(BrowserThread::UI,
165 FROM_HERE, 169 FROM_HERE,
166 base::Bind(&LogErrors, 170 base::Bind(&LogErrors,
167 base::Owned(errors.release()))); 171 base::Owned(errors.release())));
168 172
169 return prefs.release(); 173 return prefs.release();
170 } 174 }
171 175
172 } // namespace policy 176 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_pref_store.h ('k') | chrome/browser/prefs/overlay_user_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698