Index: chrome/browser/chromeos/app_mode/kiosk_app_data.cc |
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_data.cc b/chrome/browser/chromeos/app_mode/kiosk_app_data.cc |
index fd07e9cbba681c5605ff3e47d5104a0e7c308bfa..680ccc874a61d40240618c55573e342dbcb823fa 100644 |
--- a/chrome/browser/chromeos/app_mode/kiosk_app_data.cc |
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_data.cc |
@@ -246,10 +246,12 @@ class KioskAppData::WebstoreDataParser |
// KioskAppData |
KioskAppData::KioskAppData(KioskAppDataDelegate* delegate, |
- const std::string& app_id) |
+ const std::string& app_id, |
+ const std::string& user_id) |
: delegate_(delegate), |
status_(STATUS_INIT), |
- id_(app_id) { |
+ app_id_(app_id), |
+ user_id_(user_id) { |
} |
KioskAppData::~KioskAppData() {} |
@@ -269,7 +271,7 @@ void KioskAppData::ClearCache() { |
DictionaryPrefUpdate dict_update(local_state, |
KioskAppManager::kKioskDictionaryName); |
- std::string app_key = std::string(KioskAppManager::kKeyApps) + '.' + id_; |
+ std::string app_key = std::string(KioskAppManager::kKeyApps) + '.' + app_id_; |
dict_update->Remove(app_key, NULL); |
if (!icon_path_.empty()) { |
@@ -297,10 +299,10 @@ void KioskAppData::SetStatus(Status status) { |
break; |
case STATUS_LOADING: |
case STATUS_LOADED: |
- delegate_->OnKioskAppDataChanged(id_); |
+ delegate_->OnKioskAppDataChanged(app_id_); |
break; |
case STATUS_ERROR: |
- delegate_->OnKioskAppDataLoadFailure(id_); |
+ delegate_->OnKioskAppDataLoadFailure(app_id_); |
break; |
}; |
} |
@@ -310,7 +312,7 @@ net::URLRequestContextGetter* KioskAppData::GetRequestContextGetter() { |
} |
bool KioskAppData::LoadFromCache() { |
- std::string app_key = std::string(KioskAppManager::kKeyApps) + '.' + id_; |
+ std::string app_key = std::string(KioskAppManager::kKeyApps) + '.' + app_id_; |
std::string name_key = app_key + '.' + kKeyName; |
std::string icon_path_key = app_key + '.' + kKeyIcon; |
@@ -333,7 +335,7 @@ bool KioskAppData::LoadFromCache() { |
void KioskAppData::SetCache(const std::string& name, |
const base::FilePath& icon_path) { |
- std::string app_key = std::string(KioskAppManager::kKeyApps) + '.' + id_; |
+ std::string app_key = std::string(KioskAppManager::kKeyApps) + '.' + app_id_; |
std::string name_key = app_key + '.' + kKeyName; |
std::string icon_path_key = app_key + '.' + kKeyIcon; |
@@ -373,7 +375,7 @@ void KioskAppData::OnWebstoreParseSuccess(const SkBitmap& icon) { |
delegate_->GetKioskAppIconCacheDir(&cache_dir); |
base::FilePath icon_path = |
- cache_dir.AppendASCII(id_).AddExtension(kIconFileExtension); |
+ cache_dir.AppendASCII(app_id_).AddExtension(kIconFileExtension); |
BrowserThread::GetBlockingPool()->PostTask( |
FROM_HERE, |
base::Bind(&SaveIconToLocalOnBlockingPool, icon_path, raw_icon_)); |
@@ -391,7 +393,7 @@ void KioskAppData::StartFetch() { |
this, |
GetRequestContextGetter(), |
GURL(), |
- id_)); |
+ app_id_)); |
webstore_fetcher_->Start(); |
} |
@@ -430,7 +432,7 @@ void KioskAppData::OnWebstoreResponseParseSuccess( |
} |
// WebstoreDataParser deletes itself when done. |
- (new WebstoreDataParser(AsWeakPtr()))->Start(id_, |
+ (new WebstoreDataParser(AsWeakPtr()))->Start(app_id_, |
manifest, |
icon_url, |
GetRequestContextGetter()); |