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

Unified Diff: chrome/browser/policy/device_policy_cache.cc

Issue 9668001: Add a new policy to allow for release channel delegation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments and added the policy to the about:policy. Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
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() &&
« no previous file with comments | « chrome/browser/chromeos/device_settings_provider.cc ('k') | chrome/browser/policy/proto/chrome_device_policy.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698