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

Unified Diff: extensions/common/image_util.cc

Issue 782693002: Ensure there are always nice icons for bookmark apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac compile Created 6 years 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 | « extensions/common/image_util.h ('k') | extensions/common/image_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/image_util.cc
diff --git a/extensions/browser/image_util.cc b/extensions/common/image_util.cc
similarity index 82%
rename from extensions/browser/image_util.cc
rename to extensions/common/image_util.cc
index 2454a632fee850b4bcb51b22314d1808921670f3..4b16367fd96de9ba1d8e7c93b29a3fcc433ba610 100644
--- a/extensions/browser/image_util.cc
+++ b/extensions/common/image_util.cc
@@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "extensions/browser/image_util.h"
+#include "extensions/common/image_util.h"
#include <stdint.h>
#include <vector>
#include "base/strings/string_number_conversions.h"
+#include "base/strings/stringprintf.h"
#include "third_party/skia/include/core/SkColor.h"
namespace extensions {
@@ -41,5 +42,10 @@ bool ParseCSSColorString(const std::string& color_string, SkColor* result) {
return true;
}
+std::string GenerateCSSColorString(SkColor color) {
+ return base::StringPrintf("#%02X%02X%02X", SkColorGetR(color),
+ SkColorGetG(color), SkColorGetB(color));
+}
+
} // namespace image_util
} // namespace extensions
« no previous file with comments | « extensions/common/image_util.h ('k') | extensions/common/image_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698