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

Unified Diff: chrome/browser/ui/app_list/arc/arc_app_icon.cc

Issue 2918723002: [Merge M60] arc: Fix default app icon for CrossOver app. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_icon.h ('k') | chrome/browser/ui/app_list/arc/arc_app_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/arc/arc_app_icon.cc
diff --git a/chrome/browser/ui/app_list/arc/arc_app_icon.cc b/chrome/browser/ui/app_list/arc/arc_app_icon.cc
index 8c9c2c97e7ebef6200b0d8f0c3cd835abf44906f..58c183d2bf27afd118050772006649b0ebbf3328 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_icon.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_icon.cc
@@ -249,7 +249,8 @@ ArcAppIcon::ArcAppIcon(content::BrowserContext* context,
int resource_size_in_dip,
Observer* observer)
: context_(context),
- app_id_(GetAppFromAppOrGroupId(context, app_id)),
+ app_id_(app_id),
+ mapped_app_id_(GetAppFromAppOrGroupId(context, app_id)),
resource_size_in_dip_(resource_size_in_dip),
observer_(observer),
weak_ptr_factory_(this) {
@@ -265,19 +266,20 @@ ArcAppIcon::~ArcAppIcon() {
void ArcAppIcon::LoadForScaleFactor(ui::ScaleFactor scale_factor) {
// We provide Play Store icon from Chrome resources and it is not expected
// that we have external load request.
- DCHECK_NE(app_id_, arc::kPlayStoreAppId);
+ DCHECK_NE(app_id(), arc::kPlayStoreAppId);
const ArcAppListPrefs* const prefs = ArcAppListPrefs::Get(context_);
DCHECK(prefs);
- const base::FilePath path = prefs->GetIconPath(app_id_, scale_factor);
+ const base::FilePath path = prefs->GetIconPath(mapped_app_id_, scale_factor);
if (path.empty())
return;
base::PostTaskWithTraitsAndReplyWithResult(
FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
- base::Bind(&ArcAppIcon::ReadOnFileThread, scale_factor, path,
- prefs->MaybeGetIconPathForDefaultApp(app_id_, scale_factor)),
+ base::Bind(
+ &ArcAppIcon::ReadOnFileThread, scale_factor, path,
+ prefs->MaybeGetIconPathForDefaultApp(mapped_app_id_, scale_factor)),
base::Bind(&ArcAppIcon::OnIconRead, weak_ptr_factory_.GetWeakPtr()));
}
@@ -289,7 +291,7 @@ void ArcAppIcon::MaybeRequestIcon(ui::ScaleFactor scale_factor) {
// ArcAppListPrefs notifies ArcAppModelBuilder via Observer when icon is ready
// and ArcAppModelBuilder refreshes the icon of the corresponding item by
// calling LoadScaleFactor.
- prefs->MaybeRequestIcon(app_id_, scale_factor);
+ prefs->MaybeRequestIcon(mapped_app_id_, scale_factor);
}
// static
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_icon.h ('k') | chrome/browser/ui/app_list/arc/arc_app_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698