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

Side by Side Diff: chrome/browser/chromeos/settings/device_settings_provider.cc

Issue 2890843002: Policy implementation for encryptfs to ext4 migration strategy (Closed)
Patch Set: Fixed review comments 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/settings/device_settings_provider.h" 5 #include "chrome/browser/chromeos/settings/device_settings_provider.h"
6 6
7 #include <memory.h> 7 #include <memory.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 kStartUpFlags, 93 kStartUpFlags,
94 kStatsReportingPref, 94 kStatsReportingPref,
95 kSystemLogUploadEnabled, 95 kSystemLogUploadEnabled,
96 kSystemTimezonePolicy, 96 kSystemTimezonePolicy,
97 kSystemUse24HourClock, 97 kSystemUse24HourClock,
98 kTargetVersionPrefix, 98 kTargetVersionPrefix,
99 kUpdateDisabled, 99 kUpdateDisabled,
100 kVariationsRestrictParameter, 100 kVariationsRestrictParameter,
101 kDeviceLoginScreenLocales, 101 kDeviceLoginScreenLocales,
102 kDeviceLoginScreenInputMethods, 102 kDeviceLoginScreenInputMethods,
103 kDeviceEcryptfsMigrationStrategy,
103 }; 104 };
104 105
105 void DecodeLoginPolicies( 106 void DecodeLoginPolicies(
106 const em::ChromeDeviceSettingsProto& policy, 107 const em::ChromeDeviceSettingsProto& policy,
107 PrefValueMap* new_values_cache) { 108 PrefValueMap* new_values_cache) {
108 // For all our boolean settings the following is applicable: 109 // For all our boolean settings the following is applicable:
109 // true is default permissive value and false is safe prohibitive value. 110 // true is default permissive value and false is safe prohibitive value.
110 // Exceptions: 111 // Exceptions:
111 // kAccountsPrefEphemeralUsersEnabled has a default value of false. 112 // kAccountsPrefEphemeralUsersEnabled has a default value of false.
112 // kAccountsPrefSupervisedUsersEnabled has a default value of false 113 // kAccountsPrefSupervisedUsersEnabled has a default value of false
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 if (policy.has_login_screen_input_methods()) { 333 if (policy.has_login_screen_input_methods()) {
333 std::unique_ptr<base::ListValue> input_methods(new base::ListValue); 334 std::unique_ptr<base::ListValue> input_methods(new base::ListValue);
334 const em::LoginScreenInputMethodsProto& login_screen_input_methods( 335 const em::LoginScreenInputMethodsProto& login_screen_input_methods(
335 policy.login_screen_input_methods()); 336 policy.login_screen_input_methods());
336 for (const auto& input_method : 337 for (const auto& input_method :
337 login_screen_input_methods.login_screen_input_methods()) 338 login_screen_input_methods.login_screen_input_methods())
338 input_methods->AppendString(input_method); 339 input_methods->AppendString(input_method);
339 new_values_cache->SetValue(kDeviceLoginScreenInputMethods, 340 new_values_cache->SetValue(kDeviceLoginScreenInputMethods,
340 std::move(input_methods)); 341 std::move(input_methods));
341 } 342 }
343
344 if (policy.has_device_ecryptfs_migration_strategy()) {
345 new_values_cache->SetInteger(
346 kDeviceEcryptfsMigrationStrategy,
347 policy.device_ecryptfs_migration_strategy().migration_strategy());
348 }
342 } 349 }
343 350
344 void DecodeNetworkPolicies( 351 void DecodeNetworkPolicies(
345 const em::ChromeDeviceSettingsProto& policy, 352 const em::ChromeDeviceSettingsProto& policy,
346 PrefValueMap* new_values_cache) { 353 PrefValueMap* new_values_cache) {
347 // kSignedDataRoamingEnabled has a default value of false. 354 // kSignedDataRoamingEnabled has a default value of false.
348 new_values_cache->SetBoolean( 355 new_values_cache->SetBoolean(
349 kSignedDataRoamingEnabled, 356 kSignedDataRoamingEnabled,
350 policy.has_data_roaming_enabled() && 357 policy.has_data_roaming_enabled() &&
351 policy.data_roaming_enabled().has_data_roaming_enabled() && 358 policy.data_roaming_enabled().has_data_roaming_enabled() &&
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 // Notify the observers we are done. 909 // Notify the observers we are done.
903 std::vector<base::Closure> callbacks; 910 std::vector<base::Closure> callbacks;
904 callbacks.swap(callbacks_); 911 callbacks.swap(callbacks_);
905 for (size_t i = 0; i < callbacks.size(); ++i) 912 for (size_t i = 0; i < callbacks.size(); ++i)
906 callbacks[i].Run(); 913 callbacks[i].Run();
907 914
908 return settings_loaded; 915 return settings_loaded;
909 } 916 }
910 917
911 } // namespace chromeos 918 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698