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

Unified Diff: chrome/browser/android/webapk/webapk_installer.cc

Issue 2714633003: Adds more metadata to the about:webapks page (Closed)
Patch Set: Adds more metadata to the about:webapks page Created 3 years, 10 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/android/webapk/webapk_info.cc ('k') | chrome/browser/resources/webapks/about_webapks.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..de4e576dae33990cf76bf511467669cda4699df6 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,8 @@ 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);
- 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(sk_color);
}
// Get Chrome's current ABI. It depends on whether Chrome is running as a 32 bit
« no previous file with comments | « chrome/browser/android/webapk/webapk_info.cc ('k') | chrome/browser/resources/webapks/about_webapks.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698