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

Unified Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc

Issue 7004007: iwyu: Include stringprintf.h where appropriate, part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix 2. Created 9 years, 7 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
Index: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index 03592798ffd6f9ba0ca25c9b7f8862050761d2f7..e56124076061abcaa93b62ebc362d4b7b1e34ba1 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -11,6 +11,7 @@
#include "base/file_util.h"
#include "base/memory/ref_counted_memory.h"
#include "base/string16.h"
+#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
@@ -83,8 +84,11 @@ string16 GetUrlWithLang(const GURL& url) {
std::string SkColorToRGBAString(SkColor color) {
// We convert the alpha using DoubleToString because StringPrintf will use
// locale specific formatters (e.g., use , instead of . in German).
- return StringPrintf("rgba(%d,%d,%d,%s)", SkColorGetR(color),
- SkColorGetG(color), SkColorGetB(color),
+ return base::StringPrintf(
+ "rgba(%d,%d,%d,%s)",
+ SkColorGetR(color),
+ SkColorGetG(color),
+ SkColorGetB(color),
base::DoubleToString(SkColorGetA(color) / 255.0).c_str());
}
« no previous file with comments | « chrome/browser/ui/webui/gpu_internals_ui.cc ('k') | chrome/browser/ui/webui/options/language_options_handler_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698