Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/task.h" | 10 #include "base/task.h" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 174 policy, | 174 policy, |
| 175 callback_factory_.NewCallback( | 175 callback_factory_.NewCallback( |
| 176 &DevicePolicyCache::PolicyStoreOpCompleted)); | 176 &DevicePolicyCache::PolicyStoreOpCompleted)); |
| 177 } | 177 } |
| 178 | 178 |
| 179 void DevicePolicyCache::SetUnmanaged() { | 179 void DevicePolicyCache::SetUnmanaged() { |
| 180 LOG(WARNING) << "Tried to set DevicePolicyCache to 'unmanaged'!"; | 180 LOG(WARNING) << "Tried to set DevicePolicyCache to 'unmanaged'!"; |
| 181 // This is not supported for DevicePolicyCache. | 181 // This is not supported for DevicePolicyCache. |
| 182 } | 182 } |
| 183 | 183 |
| 184 bool DevicePolicyCache::IsReady() { | |
|
Mattias Nissler (ping if slow)
2011/06/24 17:27:17
Hm, now we have IsReady() and initialization_compl
gfeher
2011/06/27 16:50:24
They actually do mean two different things:
initia
| |
| 185 return initialization_complete() || !starting_up_; | |
| 186 } | |
| 187 | |
| 184 void DevicePolicyCache::OnRetrievePolicyCompleted( | 188 void DevicePolicyCache::OnRetrievePolicyCompleted( |
| 185 chromeos::SignedSettings::ReturnCode code, | 189 chromeos::SignedSettings::ReturnCode code, |
| 186 const em::PolicyFetchResponse& policy) { | 190 const em::PolicyFetchResponse& policy) { |
| 187 DCHECK(CalledOnValidThread()); | 191 DCHECK(CalledOnValidThread()); |
| 188 if (starting_up_) { | 192 if (starting_up_) { |
| 189 starting_up_ = false; | 193 starting_up_ = false; |
| 190 if (code == chromeos::SignedSettings::NOT_FOUND || | 194 if (code == chromeos::SignedSettings::NOT_FOUND || |
| 191 code == chromeos::SignedSettings::KEY_UNAVAILABLE || | 195 code == chromeos::SignedSettings::KEY_UNAVAILABLE || |
| 192 !policy.has_policy_data()) { | 196 !policy.has_policy_data()) { |
| 193 InformNotifier(CloudPolicySubsystem::UNENROLLED, | 197 InformNotifier(CloudPolicySubsystem::UNENROLLED, |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 295 Value::CreateStringValue(container.proxy_pac_url())); | 299 Value::CreateStringValue(container.proxy_pac_url())); |
| 296 } | 300 } |
| 297 if (container.has_proxy_bypass_list()) { | 301 if (container.has_proxy_bypass_list()) { |
| 298 recommended->Set(kPolicyProxyBypassList, | 302 recommended->Set(kPolicyProxyBypassList, |
| 299 Value::CreateStringValue(container.proxy_bypass_list())); | 303 Value::CreateStringValue(container.proxy_bypass_list())); |
| 300 } | 304 } |
| 301 } | 305 } |
| 302 } | 306 } |
| 303 | 307 |
| 304 } // namespace policy | 308 } // namespace policy |
| OLD | NEW |