Commit 416f5a6e authored by Abhishek Bhardwaj's avatar Abhishek Bhardwaj Committed by Commit Bot

Parse DeviceScheduledUpdateCheck proto

This change adds logic to parse a DeviceScheduledUpdateCheck proto.

BUG=924762
TEST=None.

Change-Id: Ib8360d27884b46393ec5546a9c004a61a11ca0bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1574462Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarRahul Chaturvedi <rkc@chromium.org>
Reviewed-by: default avatarPavol Marko <pmarko@chromium.org>
Reviewed-by: default avatarLutz Justen <ljusten@chromium.org>
Commit-Queue: Abhishek Bhardwaj <abhishekbh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#654586}
parent 730d0f57
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <limits> #include <limits>
#include <memory> #include <memory>
#include <string> #include <string>
#include <utility>
#include "base/callback.h" #include "base/callback.h"
#include "base/json/json_reader.h" #include "base/json/json_reader.h"
...@@ -745,6 +746,16 @@ void DecodeAutoUpdatePolicies(const em::ChromeDeviceSettingsProto& policy, ...@@ -745,6 +746,16 @@ void DecodeAutoUpdatePolicies(const em::ChromeDeviceSettingsProto& policy,
nullptr); nullptr);
} }
} }
if (policy.has_device_scheduled_update_check()) {
const em::DeviceScheduledUpdateCheckProto& container(
policy.device_scheduled_update_check());
if (container.has_device_scheduled_update_check_settings()) {
SetJsonDevicePolicy(key::kDeviceScheduledUpdateCheck,
container.device_scheduled_update_check_settings(),
policies);
}
}
} }
void DecodeAccessibilityPolicies(const em::ChromeDeviceSettingsProto& policy, void DecodeAccessibilityPolicies(const em::ChromeDeviceSettingsProto& policy,
......
...@@ -11,19 +11,16 @@ const char kCrosSettingsPrefix[] = "cros."; ...@@ -11,19 +11,16 @@ const char kCrosSettingsPrefix[] = "cros.";
// All cros.accounts.* settings are stored in SignedSettings. // All cros.accounts.* settings are stored in SignedSettings.
const char kAccountsPrefAllowGuest[] = "cros.accounts.allowBWSI"; const char kAccountsPrefAllowGuest[] = "cros.accounts.allowBWSI";
const char kAccountsPrefAllowNewUser[] = "cros.accounts.allowGuest"; const char kAccountsPrefAllowNewUser[] = "cros.accounts.allowGuest";
const char kAccountsPrefShowUserNamesOnSignIn[] const char kAccountsPrefShowUserNamesOnSignIn[] =
= "cros.accounts.showUserNamesOnSignIn"; "cros.accounts.showUserNamesOnSignIn";
const char kAccountsPrefUsers[] = "cros.accounts.users"; const char kAccountsPrefUsers[] = "cros.accounts.users";
const char kAccountsPrefEphemeralUsersEnabled[] = const char kAccountsPrefEphemeralUsersEnabled[] =
"cros.accounts.ephemeralUsersEnabled"; "cros.accounts.ephemeralUsersEnabled";
const char kAccountsPrefDeviceLocalAccounts[] = const char kAccountsPrefDeviceLocalAccounts[] =
"cros.accounts.deviceLocalAccounts"; "cros.accounts.deviceLocalAccounts";
const char kAccountsPrefDeviceLocalAccountsKeyId[] = const char kAccountsPrefDeviceLocalAccountsKeyId[] = "id";
"id"; const char kAccountsPrefDeviceLocalAccountsKeyType[] = "type";
const char kAccountsPrefDeviceLocalAccountsKeyType[] = const char kAccountsPrefDeviceLocalAccountsKeyKioskAppId[] = "kiosk_app_id";
"type";
const char kAccountsPrefDeviceLocalAccountsKeyKioskAppId[] =
"kiosk_app_id";
const char kAccountsPrefDeviceLocalAccountsKeyKioskAppUpdateURL[] = const char kAccountsPrefDeviceLocalAccountsKeyKioskAppUpdateURL[] =
"kiosk_app_update_url"; "kiosk_app_update_url";
const char kAccountsPrefDeviceLocalAccountsKeyArcKioskPackage[] = const char kAccountsPrefDeviceLocalAccountsKeyArcKioskPackage[] =
...@@ -379,4 +376,10 @@ const char kDeviceWilcoDtcAllowed[] = "cros.device.wilco_dtc_allowed"; ...@@ -379,4 +376,10 @@ const char kDeviceWilcoDtcAllowed[] = "cros.device.wilco_dtc_allowed";
// An enum pref that specifies the device dock MAC address source. // An enum pref that specifies the device dock MAC address source.
const char kDeviceDockMacAddressSource[] = const char kDeviceDockMacAddressSource[] =
"cros.device.device_dock_mac_address_source"; "cros.device.device_dock_mac_address_source";
// A dictionary pref that mandates the recurring schedule for update checks. The
// schedule is followed even if the device is suspended, however, it's not
// respected when the device is shutdown.
const char kDeviceScheduledUpdateCheck[] =
"cros.device.device_scheduled_update_check";
} // namespace chromeos } // namespace chromeos
...@@ -219,6 +219,9 @@ extern const char kDeviceWilcoDtcAllowed[]; ...@@ -219,6 +219,9 @@ extern const char kDeviceWilcoDtcAllowed[];
COMPONENT_EXPORT(CHROMEOS_SETTINGS) COMPONENT_EXPORT(CHROMEOS_SETTINGS)
extern const char kDeviceDockMacAddressSource[]; extern const char kDeviceDockMacAddressSource[];
COMPONENT_EXPORT(CHROMEOS_SETTINGS)
extern const char kDeviceScheduledUpdateCheck[];
} // namespace chromeos } // namespace chromeos
#endif // CHROMEOS_SETTINGS_CROS_SETTINGS_NAMES_H_ #endif // CHROMEOS_SETTINGS_CROS_SETTINGS_NAMES_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment