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

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

Issue 2711553002: Rename the LoginApps policy into DeviceLoginScreenAppInstallList (Closed)
Patch Set: Created 3 years, 10 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 kAccountsPrefTransferSAMLCookies, 56 kAccountsPrefTransferSAMLCookies,
57 kAccountsPrefUsers, 57 kAccountsPrefUsers,
58 kAccountsPrefLoginScreenDomainAutoComplete, 58 kAccountsPrefLoginScreenDomainAutoComplete,
59 kAllowBluetooth, 59 kAllowBluetooth,
60 kAllowRedeemChromeOsRegistrationOffers, 60 kAllowRedeemChromeOsRegistrationOffers,
61 kAllowedConnectionTypesForUpdate, 61 kAllowedConnectionTypesForUpdate,
62 kAttestationForContentProtectionEnabled, 62 kAttestationForContentProtectionEnabled,
63 kDeviceAttestationEnabled, 63 kDeviceAttestationEnabled,
64 kDeviceDisabled, 64 kDeviceDisabled,
65 kDeviceDisabledMessage, 65 kDeviceDisabledMessage,
66 kDeviceLoginScreenAppInstallList,
66 kDeviceOwner, 67 kDeviceOwner,
67 kDeviceQuirksDownloadEnabled, 68 kDeviceQuirksDownloadEnabled,
68 kDeviceWallpaperImage, 69 kDeviceWallpaperImage,
69 kDisplayRotationDefault, 70 kDisplayRotationDefault,
70 kExtensionCacheSize, 71 kExtensionCacheSize,
71 kHeartbeatEnabled, 72 kHeartbeatEnabled,
72 kHeartbeatFrequency, 73 kHeartbeatFrequency,
73 kLoginApps,
74 kLoginAuthenticationBehavior, 74 kLoginAuthenticationBehavior,
75 kLoginVideoCaptureAllowedUrls, 75 kLoginVideoCaptureAllowedUrls,
76 kPolicyMissingMitigationMode, 76 kPolicyMissingMitigationMode,
77 kRebootOnShutdown, 77 kRebootOnShutdown,
78 kReleaseChannel, 78 kReleaseChannel,
79 kReleaseChannelDelegated, 79 kReleaseChannelDelegated,
80 kReportDeviceActivityTimes, 80 kReportDeviceActivityTimes,
81 kReportDeviceBootMode, 81 kReportDeviceBootMode,
82 kReportDeviceHardwareStatus, 82 kReportDeviceHardwareStatus,
83 kReportDeviceLocation, 83 kReportDeviceLocation,
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 std::unique_ptr<base::ListValue> list(new base::ListValue()); 303 std::unique_ptr<base::ListValue> list(new base::ListValue());
304 const em::LoginVideoCaptureAllowedUrlsProto& 304 const em::LoginVideoCaptureAllowedUrlsProto&
305 login_video_capture_allowed_urls_proto = 305 login_video_capture_allowed_urls_proto =
306 policy.login_video_capture_allowed_urls(); 306 policy.login_video_capture_allowed_urls();
307 for (const auto& value : login_video_capture_allowed_urls_proto.urls()) { 307 for (const auto& value : login_video_capture_allowed_urls_proto.urls()) {
308 list->AppendString(value); 308 list->AppendString(value);
309 } 309 }
310 new_values_cache->SetValue(kLoginVideoCaptureAllowedUrls, std::move(list)); 310 new_values_cache->SetValue(kLoginVideoCaptureAllowedUrls, std::move(list));
311 } 311 }
312 312
313 if (policy.has_login_apps()) { 313 if (policy.has_device_login_screen_app_install_list()) {
314 std::unique_ptr<base::ListValue> login_apps(new base::ListValue); 314 std::unique_ptr<base::ListValue> apps(new base::ListValue);
315 const em::LoginAppsProto& login_apps_proto(policy.login_apps()); 315 const em::DeviceLoginScreenAppInstallListProto& proto(
316 for (const auto& login_app : login_apps_proto.login_apps()) 316 policy.device_login_screen_app_install_list());
317 login_apps->AppendString(login_app); 317 for (const auto& app : proto.device_login_screen_app_install_list())
318 new_values_cache->SetValue(kLoginApps, std::move(login_apps)); 318 apps->AppendString(app);
319 new_values_cache->SetValue(kDeviceLoginScreenAppInstallList,
320 std::move(apps));
319 } 321 }
320 322
321 if (policy.has_login_screen_locales()) { 323 if (policy.has_login_screen_locales()) {
322 std::unique_ptr<base::ListValue> locales(new base::ListValue); 324 std::unique_ptr<base::ListValue> locales(new base::ListValue);
323 const em::LoginScreenLocalesProto& login_screen_locales( 325 const em::LoginScreenLocalesProto& login_screen_locales(
324 policy.login_screen_locales()); 326 policy.login_screen_locales());
325 for (const auto& locale : login_screen_locales.login_screen_locales()) 327 for (const auto& locale : login_screen_locales.login_screen_locales())
326 locales->AppendString(locale); 328 locales->AppendString(locale);
327 new_values_cache->SetValue(kDeviceLoginScreenLocales, std::move(locales)); 329 new_values_cache->SetValue(kDeviceLoginScreenLocales, std::move(locales));
328 } 330 }
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 // Notify the observers we are done. 900 // Notify the observers we are done.
899 std::vector<base::Closure> callbacks; 901 std::vector<base::Closure> callbacks;
900 callbacks.swap(callbacks_); 902 callbacks.swap(callbacks_);
901 for (size_t i = 0; i < callbacks.size(); ++i) 903 for (size_t i = 0; i < callbacks.size(); ++i)
902 callbacks[i].Run(); 904 callbacks[i].Run();
903 905
904 return settings_loaded; 906 return settings_loaded;
905 } 907 }
906 908
907 } // namespace chromeos 909 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/proto/chrome_device_policy.proto ('k') | chrome/test/data/policy/policy_test_cases.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698