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 465421589d410e7194678dd403ba9e25e4e86aec..4a561f324b683e0ca0b33c732596f2dd85c173ff 100644 |
--- a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc |
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc |
@@ -17,6 +17,7 @@ |
#include "chrome/browser/chromeos/app_mode/kiosk_app_data.h" |
#include "chrome/browser/chromeos/app_mode/kiosk_app_manager_observer.h" |
#include "chrome/browser/chromeos/login/user_manager.h" |
+#include "chrome/browser/chromeos/policy/device_local_account.h" |
#include "chrome/browser/chromeos/settings/cros_settings.h" |
#include "chrome/common/chrome_notification_types.h" |
#include "chrome/common/chrome_paths.h" |
@@ -26,7 +27,7 @@ namespace chromeos { |
namespace { |
-std::string FormatKioskAppUserId(const std::string& app_id) { |
+std::string FormatKioskAppAccountId(const std::string& app_id) { |
return app_id + '@' + UserManager::kKioskAppUserDomain; |
} |
@@ -59,7 +60,7 @@ bool DecodeDeviceLocalAccount(const base::Value* account_spec, |
int type; |
if (!account_dict->GetIntegerWithoutPathExpansion( |
kAccountsPrefDeviceLocalAccountsKeyType, &type) || |
- type != DEVICE_LOCAL_ACCOUNT_TYPE_KIOSK_APP) { |
+ type != policy::DeviceLocalAccount::TYPE_KIOSK_APP) { |
// Not a kiosk app. |
return false; |
} |
@@ -116,7 +117,7 @@ std::string KioskAppManager::GetAutoLaunchApp() const { |
void KioskAppManager::SetAutoLaunchApp(const std::string& app_id) { |
CrosSettings::Get()->SetString( |
kAccountsPrefDeviceLocalAccountAutoLoginId, |
- app_id.empty() ? std::string() : FormatKioskAppUserId(app_id)); |
+ app_id.empty() ? std::string() : FormatKioskAppAccountId(app_id)); |
CrosSettings::Get()->SetInteger( |
kAccountsPrefDeviceLocalAccountAutoLoginDelay, 0); |
} |
@@ -144,10 +145,10 @@ void KioskAppManager::AddApp(const std::string& app_id) { |
// Add the new account. |
scoped_ptr<base::DictionaryValue> new_entry(new base::DictionaryValue()); |
new_entry->SetStringWithoutPathExpansion( |
- kAccountsPrefDeviceLocalAccountsKeyId, FormatKioskAppUserId(app_id)); |
+ kAccountsPrefDeviceLocalAccountsKeyId, FormatKioskAppAccountId(app_id)); |
new_entry->SetIntegerWithoutPathExpansion( |
kAccountsPrefDeviceLocalAccountsKeyType, |
- DEVICE_LOCAL_ACCOUNT_TYPE_KIOSK_APP); |
+ policy::DeviceLocalAccount::TYPE_KIOSK_APP); |
new_entry->SetStringWithoutPathExpansion( |
kAccountsPrefDeviceLocalAccountsKeyKioskAppId, app_id); |
new_accounts_list.Append(new_entry.release()); |