summaryrefslogtreecommitdiffstats
path: root/chrome/browser/themes
diff options
context:
space:
mode:
authoryusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 17:23:56 +0000
committeryusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 17:23:56 +0000
commit05c7da698dc0aa33c4a116dacfcadc90702cf83b (patch)
tree8742dcda690a4420a4d3076c0c4d01f9bc80cf24 /chrome/browser/themes
parent4bef1e0e520daf9d70f5cefa8d5c9c0679308498 (diff)
downloadchromium_src-05c7da698dc0aa33c4a116dacfcadc90702cf83b.zip
chromium_src-05c7da698dc0aa33c4a116dacfcadc90702cf83b.tar.gz
chromium_src-05c7da698dc0aa33c4a116dacfcadc90702cf83b.tar.bz2
Remove Value::GetAsInteger() calls.
Since r83705, Value::GetAsDouble() can return an integer value as double. We no longer need to call Value::GetAsInteger() explicitly. BUG=None TEST=ran try Review URL: http://codereview.chromium.org/6901084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84263 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/themes')
-rw-r--r--chrome/browser/themes/browser_theme_pack.cc21
1 files changed, 3 insertions, 18 deletions
diff --git a/chrome/browser/themes/browser_theme_pack.cc b/chrome/browser/themes/browser_theme_pack.cc
index 5bfcd88..95945b4 100644
--- a/chrome/browser/themes/browser_theme_pack.cc
+++ b/chrome/browser/themes/browser_theme_pack.cc
@@ -298,21 +298,6 @@ RefCountedMemory* ReadFileData(const FilePath& path) {
return NULL;
}
-// Does error checking for invalid incoming data while trying to read an
-// floating point value.
-bool ValidDoubleValue(ListValue* tint_list, int index, double* out) {
- if (tint_list->GetDouble(index, out))
- return true;
-
- int value = 0;
- if (tint_list->GetInteger(index, &value)) {
- *out = value;
- return true;
- }
-
- return false;
-}
-
// Shifts a bitmap's HSL values. The caller is responsible for deleting
// the returned image.
gfx::Image* CreateHSLShiftedImage(const gfx::Image& image,
@@ -646,9 +631,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;