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

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

Issue 6901084: Use new APIs in base/values.h: Value::GetAsNumber and DictionaryValue::GetNumber. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 8 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 5c97d10d3cabf10a06fa6ec65abb14d24e5bd21d..df02e24944f5b06343f7356a92cee02571185e88 100644
--- a/chrome/browser/themes/browser_theme_pack.cc
+++ b/chrome/browser/themes/browser_theme_pack.cc
@@ -623,9 +623,9 @@ void BrowserThemePack::BuildTintsFromJSON(DictionaryValue* tints_value) {
(tint_list->GetSize() == 3)) {
color_utils::HSL hsl = { -1, -1, -1 };
- if (ValidDoubleValue(tint_list, 0, &hsl.h) &&
- ValidDoubleValue(tint_list, 1, &hsl.s) &&
- ValidDoubleValue(tint_list, 2, &hsl.l)) {
+ if (tint_list->GetDouble(0, &hsl.h) &&
+ tint_list->GetDouble(1, &hsl.s) &&
+ tint_list->GetDouble(2, &hsl.l)) {
int id = GetIntForString(*iter, kTintTable);
if (id != -1) {
temp_tints[id] = hsl;

Powered by Google App Engine
This is Rietveld 408576698