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

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: Self review; test 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
Index: extensions/common/image_util.cc
diff --git a/extensions/browser/image_util.cc b/extensions/common/image_util.cc
similarity index 83%
rename from extensions/browser/image_util.cc
rename to extensions/common/image_util.cc
index 2454a632fee850b4bcb51b22314d1808921670f3..c8a143e881c6d3daa76f15d2b21ff0e339e16f83 100644
--- a/extensions/browser/image_util.cc
+++ b/extensions/common/image_util.cc
@@ -2,7 +2,7 @@
// 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>
@@ -41,5 +41,13 @@ bool ParseCSSColorString(const std::string& color_string, SkColor* result) {
return true;
}
+std::string GenerateCSSColorString(SkColor color) {
+ char buffer[8];
+
+ sprintf(buffer, "#%02X%02X%02X", SkColorGetR(color), SkColorGetG(color),
+ SkColorGetB(color));
+ return std::string(buffer);
calamity 2014/12/09 03:46:12 Use base::StringPrintf instead. Fixed size buffers
benwells 2014/12/09 08:28:35 Done.
+}
+
} // namespace image_util
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698