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

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

Issue 2894443002: arc: Set custom icon in shelf for ARC apps. (Closed)
Patch Set: rebase 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_list_prefs.h » ('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 06a52ec6a5051a8a2843f9e0177627256c130754..8c9c2c97e7ebef6200b0d8f0c3cd835abf44906f 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_icon.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_icon.cc
@@ -32,7 +32,7 @@
namespace {
-bool disable_safe_decoding = false;
+bool disable_safe_decoding_for_testing = false;
std::string GetAppFromAppOrGroupId(content::BrowserContext* context,
const std::string& app_or_group_id) {
@@ -236,7 +236,12 @@ void ArcAppIcon::DecodeRequest::OnDecodeImageFailed() {
// static
void ArcAppIcon::DisableSafeDecodingForTesting() {
- disable_safe_decoding = true;
+ disable_safe_decoding_for_testing = true;
+}
+
+// static
+bool ArcAppIcon::IsSafeDecodingDisabledForTesting() {
+ return disable_safe_decoding_for_testing;
}
ArcAppIcon::ArcAppIcon(content::BrowserContext* context,
@@ -335,7 +340,7 @@ void ArcAppIcon::OnIconRead(
decode_requests_.push_back(base::MakeUnique<DecodeRequest>(
weak_ptr_factory_.GetWeakPtr(), resource_size_in_dip_,
read_result->scale_factor));
- if (disable_safe_decoding) {
+ if (disable_safe_decoding_for_testing) {
SkBitmap bitmap;
if (!read_result->unsafe_icon_data.empty() &&
gfx::PNGCodec::Decode(
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_icon.h ('k') | chrome/browser/ui/app_list/arc/arc_app_list_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698