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

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

Issue 8586030: Added ConfigurationPolicyProvider::RefreshPolicies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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/device_policy_cache.h" 5 #include "chrome/browser/policy/device_policy_cache.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 base::Bind(&DevicePolicyCache::PolicyStoreOpCompleted, 184 base::Bind(&DevicePolicyCache::PolicyStoreOpCompleted,
185 weak_ptr_factory_.GetWeakPtr()); 185 weak_ptr_factory_.GetWeakPtr());
186 new StorePolicyOperation(signed_settings_helper_, policy, callback); 186 new StorePolicyOperation(signed_settings_helper_, policy, callback);
187 } 187 }
188 188
189 void DevicePolicyCache::SetUnmanaged() { 189 void DevicePolicyCache::SetUnmanaged() {
190 LOG(WARNING) << "Tried to set DevicePolicyCache to 'unmanaged'!"; 190 LOG(WARNING) << "Tried to set DevicePolicyCache to 'unmanaged'!";
191 // This is not supported for DevicePolicyCache. 191 // This is not supported for DevicePolicyCache.
192 } 192 }
193 193
194 void DevicePolicyCache::SetFetchingDone() {
195 // Not interesting for device policy cache.
196 }
197
198 void DevicePolicyCache::OnRetrievePolicyCompleted( 194 void DevicePolicyCache::OnRetrievePolicyCompleted(
199 chromeos::SignedSettings::ReturnCode code, 195 chromeos::SignedSettings::ReturnCode code,
200 const em::PolicyFetchResponse& policy) { 196 const em::PolicyFetchResponse& policy) {
201 DCHECK(CalledOnValidThread()); 197 DCHECK(CalledOnValidThread());
202 if (!IsReady()) { 198 if (!IsReady()) {
203 std::string device_token; 199 std::string device_token;
204 InstallInitialPolicy(code, policy, &device_token); 200 InstallInitialPolicy(code, policy, &device_token);
205 // We need to call SetDeviceToken unconditionally to indicate the cache has 201 // We need to call SetDeviceToken unconditionally to indicate the cache has
206 // finished loading. 202 // finished loading.
207 data_store_->SetDeviceToken(device_token, true); 203 data_store_->SetDeviceToken(device_token, true);
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 if (policy.has_open_network_configuration() && 356 if (policy.has_open_network_configuration() &&
361 policy.open_network_configuration().has_open_network_configuration()) { 357 policy.open_network_configuration().has_open_network_configuration()) {
362 std::string config( 358 std::string config(
363 policy.open_network_configuration().open_network_configuration()); 359 policy.open_network_configuration().open_network_configuration());
364 mandatory->Set(kPolicyDeviceOpenNetworkConfiguration, 360 mandatory->Set(kPolicyDeviceOpenNetworkConfiguration,
365 Value::CreateStringValue(config)); 361 Value::CreateStringValue(config));
366 } 362 }
367 } 363 }
368 364
369 } // namespace policy 365 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/device_policy_cache.h ('k') | chrome/browser/policy/file_based_policy_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698