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

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

Issue 9704092: Adds a device policy to specify the set of initial urls for the demo user account. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 SetReleaseTrack(channel); 532 SetReleaseTrack(channel);
533 } 533 }
534 if (container.has_release_channel_delegated()) { 534 if (container.has_release_channel_delegated()) {
535 policies->Set(key::kChromeOsReleaseChannelDelegated, 535 policies->Set(key::kChromeOsReleaseChannelDelegated,
536 POLICY_LEVEL_MANDATORY, 536 POLICY_LEVEL_MANDATORY,
537 POLICY_SCOPE_MACHINE, 537 POLICY_SCOPE_MACHINE,
538 Value::CreateBooleanValue( 538 Value::CreateBooleanValue(
539 container.release_channel_delegated())); 539 container.release_channel_delegated()));
540 } 540 }
541 } 541 }
542
543 if (policy.has_start_up_urls()) {
544 const em::StartUpUrlsProto& container(policy.start_up_urls());
545 if (container.start_up_urls_size()) {
546 ListValue* urls = new ListValue();
547 RepeatedPtrField<std::string>::const_iterator entry;
548 for (entry = container.start_up_urls().begin();
549 entry != container.start_up_urls().end();
550 ++entry) {
551 urls->Append(Value::CreateStringValue(*entry));
552 }
553 policies->Set(key::kDeviceStartUpUrls, POLICY_LEVEL_MANDATORY,
554 POLICY_SCOPE_MACHINE, urls);
Joao da Silva 2012/03/16 15:55:18 Break after the , in both lines for consistency wi
pastarmovj 2012/03/19 14:20:49 Done.
555 }
556 }
542 } 557 }
543 558
544 // static 559 // static
545 void DevicePolicyCache::DecodeDevicePolicy( 560 void DevicePolicyCache::DecodeDevicePolicy(
546 const em::ChromeDeviceSettingsProto& policy, 561 const em::ChromeDeviceSettingsProto& policy,
547 PolicyMap* policies) { 562 PolicyMap* policies) {
548 // Decode the various groups of policies. 563 // Decode the various groups of policies.
549 DecodeLoginPolicies(policy, policies); 564 DecodeLoginPolicies(policy, policies);
550 DecodeKioskPolicies(policy, policies); 565 DecodeKioskPolicies(policy, policies);
551 DecodeNetworkPolicies(policy, policies); 566 DecodeNetworkPolicies(policy, policies);
552 DecodeReportingPolicies(policy, policies); 567 DecodeReportingPolicies(policy, policies);
553 DecodeGenericPolicies(policy, policies); 568 DecodeGenericPolicies(policy, policies);
554 } 569 }
555 570
556 } // namespace policy 571 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698