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

Side by Side Diff: chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc

Issue 2890843002: Policy implementation for encryptfs to ext4 migration strategy (Closed)
Patch Set: Merge done Created 3 years, 6 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
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/chromeos/policy/device_policy_decoder_chromeos.h" 5 #include "chrome/browser/chromeos/policy/device_policy_decoder_chromeos.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 std::unique_ptr<base::ListValue> input_methods(new base::ListValue); 376 std::unique_ptr<base::ListValue> input_methods(new base::ListValue);
377 const em::LoginScreenInputMethodsProto& login_screen_input_methods( 377 const em::LoginScreenInputMethodsProto& login_screen_input_methods(
378 policy.login_screen_input_methods()); 378 policy.login_screen_input_methods());
379 for (const auto& input_method : 379 for (const auto& input_method :
380 login_screen_input_methods.login_screen_input_methods()) 380 login_screen_input_methods.login_screen_input_methods())
381 input_methods->AppendString(input_method); 381 input_methods->AppendString(input_method);
382 policies->Set(key::kDeviceLoginScreenInputMethods, POLICY_LEVEL_MANDATORY, 382 policies->Set(key::kDeviceLoginScreenInputMethods, POLICY_LEVEL_MANDATORY,
383 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, 383 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD,
384 std::move(input_methods), nullptr); 384 std::move(input_methods), nullptr);
385 } 385 }
386
387 if (policy.has_device_ecryptfs_migration_strategy()) {
388 const em::DeviceEcryptfsMigrationStrategyProto& container(
389 policy.device_ecryptfs_migration_strategy());
390 if (container.has_migration_strategy()) {
391 policies->Set(
392 key::kDeviceEcryptfsMigrationStrategy, POLICY_LEVEL_MANDATORY,
393 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD,
394 DecodeIntegerValue(container.migration_strategy()), nullptr);
395 }
396 }
386 } 397 }
387 398
388 void DecodeNetworkPolicies(const em::ChromeDeviceSettingsProto& policy, 399 void DecodeNetworkPolicies(const em::ChromeDeviceSettingsProto& policy,
389 PolicyMap* policies) { 400 PolicyMap* policies) {
390 if (policy.has_data_roaming_enabled()) { 401 if (policy.has_data_roaming_enabled()) {
391 const em::DataRoamingEnabledProto& container(policy.data_roaming_enabled()); 402 const em::DataRoamingEnabledProto& container(policy.data_roaming_enabled());
392 if (container.has_data_roaming_enabled()) { 403 if (container.has_data_roaming_enabled()) {
393 policies->Set( 404 policies->Set(
394 key::kDeviceDataRoamingEnabled, POLICY_LEVEL_MANDATORY, 405 key::kDeviceDataRoamingEnabled, POLICY_LEVEL_MANDATORY,
395 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, 406 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD,
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 // Decode the various groups of policies. 896 // Decode the various groups of policies.
886 DecodeLoginPolicies(policy, policies); 897 DecodeLoginPolicies(policy, policies);
887 DecodeNetworkPolicies(policy, policies); 898 DecodeNetworkPolicies(policy, policies);
888 DecodeReportingPolicies(policy, policies); 899 DecodeReportingPolicies(policy, policies);
889 DecodeAutoUpdatePolicies(policy, policies); 900 DecodeAutoUpdatePolicies(policy, policies);
890 DecodeAccessibilityPolicies(policy, policies); 901 DecodeAccessibilityPolicies(policy, policies);
891 DecodeGenericPolicies(policy, policies); 902 DecodeGenericPolicies(policy, policies);
892 } 903 }
893 904
894 } // namespace policy 905 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screens/user_selection_screen.cc ('k') | chrome/test/data/policy/policy_test_cases.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698