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

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: ToT rebase. 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 4099ccb13941c0134ebf161d1b1add7ca3e5f091..62f738dfb416201a19a9c9229f51a363eac65045 100644
--- a/chrome/browser/policy/device_policy_cache.cc
+++ b/chrome/browser/policy/device_policy_cache.cc
@@ -517,18 +517,27 @@ void DevicePolicyCache::DecodeGenericPolicies(
}
}
- 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::kChromeOsReleaseChannelDelegated,
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_MACHINE,
+ Value::CreateBooleanValue(
+ container.release_channel_delegated()));
+ }
}
}
« 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