| 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(
|
|
|