Chromium Code Reviews| Index: chrome/browser/android/webapk/webapk_installer.cc |
| diff --git a/chrome/browser/android/webapk/webapk_installer.cc b/chrome/browser/android/webapk/webapk_installer.cc |
| index 7df48b20facd97280314ca703e2ea27735ab8632..2c13e79bb49300eba2db3288de82311eb11f25d9 100644 |
| --- a/chrome/browser/android/webapk/webapk_installer.cc |
| +++ b/chrome/browser/android/webapk/webapk_installer.cc |
| @@ -33,6 +33,7 @@ |
| #include "net/traffic_annotation/network_traffic_annotation.h" |
| #include "net/url_request/url_fetcher.h" |
| #include "ui/gfx/codec/png_codec.h" |
| +#include "ui/gfx/color_utils.h" |
| #include "url/gurl.h" |
| namespace { |
| @@ -78,13 +79,7 @@ GURL GetScope(const ShortcutInfo& info) { |
| std::string ColorToString(int64_t color) { |
| if (color == content::Manifest::kInvalidOrMissingColor) |
| return ""; |
| - |
| - SkColor sk_color = reinterpret_cast<uint32_t&>(color); |
|
pkotwicz
2017/02/27 23:39:39
Nit: Please keep this line and call color_utils::S
gonzalon
2017/02/28 14:59:32
Done, but it would be nice if reviews were consist
|
| - int r = SkColorGetR(sk_color); |
| - int g = SkColorGetG(sk_color); |
| - int b = SkColorGetB(sk_color); |
| - double a = SkColorGetA(sk_color) / 255.0; |
| - return base::StringPrintf("rgba(%d,%d,%d,%.2f)", r, g, b, a); |
| + return color_utils::SkColorToRGBAString(reinterpret_cast<uint32_t&>(color)); |
| } |
| // Get Chrome's current ABI. It depends on whether Chrome is running as a 32 bit |