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

Unified Diff: chrome/browser/chromeos/policy/device_local_account.cc

Issue 676913002: kiosk: Support update url for enterprise. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/device_local_account.cc
diff --git a/chrome/browser/chromeos/policy/device_local_account.cc b/chrome/browser/chromeos/policy/device_local_account.cc
index b4624780176588fb3ee2da7752636b81d4395fe7..80b89b20dbaca5a349ef942ee9122e7f70933703 100644
--- a/chrome/browser/chromeos/policy/device_local_account.cc
+++ b/chrome/browser/chromeos/policy/device_local_account.cc
@@ -29,11 +29,13 @@ const char kDeviceLocalAccountDomainSuffix[] = ".device-local.localhost";
DeviceLocalAccount::DeviceLocalAccount(Type type,
const std::string& account_id,
- const std::string& kiosk_app_id)
+ const std::string& kiosk_app_id,
+ const std::string& kiosk_app_update_url)
: type(type),
account_id(account_id),
user_id(GenerateDeviceLocalAccountUserId(account_id, type)),
- kiosk_app_id(kiosk_app_id) {
+ kiosk_app_id(kiosk_app_id),
+ kiosk_app_update_url(kiosk_app_update_url) {
}
DeviceLocalAccount::~DeviceLocalAccount() {
@@ -106,6 +108,11 @@ void SetDeviceLocalAccounts(
entry->SetStringWithoutPathExpansion(
chromeos::kAccountsPrefDeviceLocalAccountsKeyKioskAppId,
it->kiosk_app_id);
+ if (!it->kiosk_app_update_url.empty()) {
+ entry->SetStringWithoutPathExpansion(
+ chromeos::kAccountsPrefDeviceLocalAccountsKeyKioskAppUpdateURL,
+ it->kiosk_app_update_url);
+ }
}
list.Append(entry.release());
}
@@ -150,6 +157,7 @@ std::vector<DeviceLocalAccount> GetDeviceLocalAccounts(
}
std::string kiosk_app_id;
+ std::string kiosk_app_update_url;
if (type == DeviceLocalAccount::TYPE_KIOSK_APP) {
if (!entry->GetStringWithoutPathExpansion(
chromeos::kAccountsPrefDeviceLocalAccountsKeyKioskAppId,
@@ -158,6 +166,9 @@ std::vector<DeviceLocalAccount> GetDeviceLocalAccounts(
<< i << ".";
continue;
}
+ entry->GetStringWithoutPathExpansion(
+ chromeos::kAccountsPrefDeviceLocalAccountsKeyKioskAppUpdateURL,
+ &kiosk_app_update_url);
}
if (!account_ids.insert(account_id).second) {
@@ -166,8 +177,11 @@ std::vector<DeviceLocalAccount> GetDeviceLocalAccounts(
continue;
}
- accounts.push_back(DeviceLocalAccount(
- static_cast<DeviceLocalAccount::Type>(type), account_id, kiosk_app_id));
+ accounts.push_back(
+ DeviceLocalAccount(static_cast<DeviceLocalAccount::Type>(type),
+ account_id,
+ kiosk_app_id,
+ kiosk_app_update_url));
}
return accounts;
}

Powered by Google App Engine
This is Rietveld 408576698