| Index: chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
|
| diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
|
| index 01f0886e326a92402a9b758ba6cd868c50879812..e24758d574d973fed24a0d88083074104af813b6 100644
|
| --- a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
|
| +++ b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
|
| @@ -35,6 +35,7 @@
|
| #include "chromeos/settings/cros_settings_names.h"
|
| #include "components/ownership/owner_key_util.h"
|
| #include "content/public/browser/browser_thread.h"
|
| +#include "extensions/common/extension_urls.h"
|
|
|
| namespace chromeos {
|
|
|
| @@ -275,7 +276,8 @@ void KioskAppManager::AddApp(const std::string& app_id) {
|
| device_local_accounts.push_back(policy::DeviceLocalAccount(
|
| policy::DeviceLocalAccount::TYPE_KIOSK_APP,
|
| GenerateKioskAppAccountId(app_id),
|
| - app_id));
|
| + app_id,
|
| + std::string()));
|
|
|
| policy::SetDeviceLocalAccounts(CrosSettings::Get(), device_local_accounts);
|
| }
|
| @@ -517,16 +519,14 @@ void KioskAppManager::UpdateAppData() {
|
| if (it->account_id == auto_login_account_id)
|
| auto_launch_app_id_ = it->kiosk_app_id;
|
|
|
| - // TODO(mnissler): Support non-CWS update URLs.
|
| -
|
| std::map<std::string, KioskAppData*>::iterator old_it =
|
| old_apps.find(it->kiosk_app_id);
|
| if (old_it != old_apps.end()) {
|
| apps_.push_back(old_it->second);
|
| old_apps.erase(old_it);
|
| } else {
|
| - KioskAppData* new_app =
|
| - new KioskAppData(this, it->kiosk_app_id, it->user_id);
|
| + KioskAppData* new_app = new KioskAppData(
|
| + this, it->kiosk_app_id, it->user_id, GURL(it->kiosk_app_update_url));
|
| apps_.push_back(new_app); // Takes ownership of |new_app|.
|
| new_app->Load();
|
| }
|
| @@ -550,7 +550,15 @@ void KioskAppManager::UpdateAppData() {
|
| scoped_ptr<base::DictionaryValue> prefs(new base::DictionaryValue);
|
| for (size_t i = 0; i < apps_.size(); ++i) {
|
| scoped_ptr<base::DictionaryValue> entry(new base::DictionaryValue);
|
| - entry->SetBoolean(extensions::ExternalProviderImpl::kIsFromWebstore, true);
|
| +
|
| + if (apps_[i]->update_url().is_valid()) {
|
| + entry->SetString(extensions::ExternalProviderImpl::kExternalUpdateUrl,
|
| + apps_[i]->update_url().spec());
|
| + } else {
|
| + entry->SetString(extensions::ExternalProviderImpl::kExternalUpdateUrl,
|
| + extension_urls::GetWebstoreUpdateUrl().spec());
|
| + }
|
| +
|
| prefs->Set(apps_[i]->app_id(), entry.release());
|
| }
|
| external_cache_->UpdateExtensionsList(prefs.Pass());
|
|
|