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

Unified Diff: chrome/browser/chromeos/app_mode/kiosk_app_data.cc

Issue 14927015: Translate device-local account IDs to user IDs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix forward declaration. Created 7 years, 7 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/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());
« no previous file with comments | « chrome/browser/chromeos/app_mode/kiosk_app_data.h ('k') | chrome/browser/chromeos/app_mode/kiosk_app_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698