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

Side by Side Diff: chrome/browser/policy/configuration_policy_pref_store.cc

Issue 8586030: Added ConfigurationPolicyProvider::RefreshPolicies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed win build Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 const Value** value) const { 74 const Value** value) const {
75 const Value* stored_value = NULL; 75 const Value* stored_value = NULL;
76 if (!prefs_.get() || !prefs_->GetValue(key, &stored_value)) 76 if (!prefs_.get() || !prefs_->GetValue(key, &stored_value))
77 return PrefStore::READ_NO_VALUE; 77 return PrefStore::READ_NO_VALUE;
78 78
79 if (value) 79 if (value)
80 *value = stored_value; 80 *value = stored_value;
81 return PrefStore::READ_OK; 81 return PrefStore::READ_OK;
82 } 82 }
83 83
84 void ConfigurationPolicyPrefStore::OnUpdatePolicy() { 84 void ConfigurationPolicyPrefStore::OnUpdatePolicy(
85 ConfigurationPolicyProvider* provider) {
85 Refresh(); 86 Refresh();
86 } 87 }
87 88
88 void ConfigurationPolicyPrefStore::OnProviderGoingAway() { 89 void ConfigurationPolicyPrefStore::OnProviderGoingAway() {
89 provider_ = NULL; 90 provider_ = NULL;
90 } 91 }
91 92
92 // static 93 // static
93 ConfigurationPolicyPrefStore* 94 ConfigurationPolicyPrefStore*
94 ConfigurationPolicyPrefStore::CreateManagedPlatformPolicyPrefStore() { 95 ConfigurationPolicyPrefStore::CreateManagedPlatformPolicyPrefStore() {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // issue during startup. 171 // issue during startup.
171 BrowserThread::PostTask(BrowserThread::UI, 172 BrowserThread::PostTask(BrowserThread::UI,
172 FROM_HERE, 173 FROM_HERE,
173 base::Bind(&LogErrors, 174 base::Bind(&LogErrors,
174 base::Owned(errors.release()))); 175 base::Owned(errors.release())));
175 176
176 return prefs.release(); 177 return prefs.release();
177 } 178 }
178 179
179 } // namespace policy 180 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698