Chromium Code Reviews| Index: chrome/browser/policy/device_policy_cache.cc |
| diff --git a/chrome/browser/policy/device_policy_cache.cc b/chrome/browser/policy/device_policy_cache.cc |
| index 922de4b90e657ed42d3103cd794d2c3d9e712831..b84001c8cad43ccc1dae397e3128645d8440f5c2 100644 |
| --- a/chrome/browser/policy/device_policy_cache.cc |
| +++ b/chrome/browser/policy/device_policy_cache.cc |
| @@ -406,16 +406,25 @@ void DevicePolicyCache::DecodeDevicePolicy( |
| } |
| } |
| - if (policy.has_release_channel() && |
| - policy.release_channel().has_release_channel()) { |
| - std::string channel(policy.release_channel().release_channel()); |
| - policies->Set(key::kChromeOsReleaseChannel, POLICY_LEVEL_MANDATORY, |
| - POLICY_SCOPE_MACHINE, Value::CreateStringValue(channel)); |
| - // TODO(dubroy): Once http://crosbug.com/17015 is implemented, we won't |
| - // have to pass the channel in here, only ping the update engine to tell |
| - // it to fetch the channel from the policy. |
| - chromeos::DBusThreadManager::Get()->GetUpdateEngineClient() |
| - ->SetReleaseTrack(channel); |
| + if (policy.has_release_channel()) { |
| + const em::ReleaseChannelProto& container(policy.release_channel()); |
| + if (container.has_release_channel()) { |
| + std::string channel(container.release_channel()); |
| + policies->Set(key::kChromeOsReleaseChannel, POLICY_LEVEL_MANDATORY, |
| + POLICY_SCOPE_MACHINE, Value::CreateStringValue(channel)); |
| + // TODO(dubroy): Once http://crosbug.com/17015 is implemented, we won't |
| + // have to pass the channel in here, only ping the update engine to tell |
| + // it to fetch the channel from the policy. |
| + chromeos::DBusThreadManager::Get()->GetUpdateEngineClient()-> |
| + SetReleaseTrack(channel); |
| + } |
| + if (container.has_release_channel_delegated()) { |
| + policies->Set(key::kDeviceMetricsReportingEnabled, |
|
Joao da Silva
2012/03/12 15:12:01
Wrong key.
pastarmovj
2012/03/13 15:03:29
Done.
|
| + POLICY_LEVEL_MANDATORY, |
| + POLICY_SCOPE_MACHINE, |
| + Value::CreateBooleanValue( |
| + container.release_channel_delegated())); |
| + } |
| } |
| if (policy.has_open_network_configuration() && |