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

Unified Diff: chrome/browser/themes/browser_theme_pack.cc

Issue 6248026: Rename Real* to Double* in values.* and dependent files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More renames Created 9 years, 11 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/themes/browser_theme_pack.cc
diff --git a/chrome/browser/themes/browser_theme_pack.cc b/chrome/browser/themes/browser_theme_pack.cc
index 517efd0e69f2650cec2c213f4325bb385594ffc7..32c45aa0dfb9979cf467f1a8c999f0355c70671b 100644
--- a/chrome/browser/themes/browser_theme_pack.cc
+++ b/chrome/browser/themes/browser_theme_pack.cc
@@ -298,8 +298,8 @@ RefCountedMemory* ReadFileData(const FilePath& path) {
// Does error checking for invalid incoming data while trying to read an
// floating point value.
-bool ValidRealValue(ListValue* tint_list, int index, double* out) {
- if (tint_list->GetReal(index, out))
+bool ValidDoubleValue(ListValue* tint_list, int index, double* out) {
+ if (tint_list->GetDouble(index, out))
return true;
int value = 0;
@@ -619,9 +619,9 @@ void BrowserThemePack::BuildTintsFromJSON(DictionaryValue* tints_value) {
(tint_list->GetSize() == 3)) {
color_utils::HSL hsl = { -1, -1, -1 };
- if (ValidRealValue(tint_list, 0, &hsl.h) &&
- ValidRealValue(tint_list, 1, &hsl.s) &&
- ValidRealValue(tint_list, 2, &hsl.l)) {
+ if (ValidDoubleValue(tint_list, 0, &hsl.h) &&
+ ValidDoubleValue(tint_list, 1, &hsl.s) &&
+ ValidDoubleValue(tint_list, 2, &hsl.l)) {
int id = GetIntForString(*iter, kTintTable);
if (id != -1) {
temp_tints[id] = hsl;
@@ -680,7 +680,7 @@ void BrowserThemePack::ReadColorsFromJSON(
if (color_list->GetSize() == 4) {
double alpha;
int alpha_int;
- if (color_list->GetReal(3, &alpha)) {
+ if (color_list->GetDouble(3, &alpha)) {
color = SkColorSetARGB(static_cast<int>(alpha * 255), r, g, b);
} else if (color_list->GetInteger(3, &alpha_int) &&
(alpha_int == 0 || alpha_int == 1)) {

Powered by Google App Engine
This is Rietveld 408576698