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

Issue 6901084: Use new APIs in base/values.h: Value::GetAsNumber and DictionaryValue::GetNumber. (Closed)

Created:
9 years, 8 months ago by Yusuke Sato
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Aaron Boodman, Erik does not do reviews, pam+watch_chromium.org, Zachary Kuznia
Visibility:
Public.

Description

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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=84263

Patch Set 1 #

Patch Set 2 : review fix #

Patch Set 3 : rebase #

Total comments: 4

Patch Set 4 : review fix #

Patch Set 5 : rebase, 2010->2011 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -131 lines) Patch
M chrome/browser/automation/automation_util.cc View 1 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/extensions/extension_history_api.cc View 1 1 chunk +2 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_tts_api.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_tts_api_util.h View 1 2 3 4 2 chunks +1 line, -5 lines 0 comments Download
M chrome/browser/extensions/extension_tts_api_util.cc View 1 2 3 4 2 chunks +1 line, -23 lines 0 comments Download
M chrome/browser/printing/print_dialog_cloud.cc View 1 2 chunks +3 lines, -15 lines 0 comments Download
M chrome/browser/themes/browser_theme_pack.cc View 1 2 3 2 chunks +3 lines, -18 lines 0 comments Download
M chrome/common/extensions/extension.cc View 1 2 3 2 chunks +6 lines, -8 lines 0 comments Download
M chrome/common/json_schema_validator.cc View 1 2 3 4 3 chunks +6 lines, -27 lines 0 comments Download
M chrome/test/webdriver/cookie.cc View 1 1 chunk +1 line, -4 lines 0 comments Download
M content/browser/host_zoom_map.cc View 1 2 3 1 chunk +0 lines, -18 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Yusuke Sato
9 years, 8 months ago (2011-04-28 08:25:16 UTC) #1
Mihai Parparita -not on Chrome
Looks like this can be used in a few more places: http://www.google.com/codesearch/p?hl=en#OAMlx_jo-ck/src/chrome/test/webdriver/cookie.cc&q=getdouble%20getinteger%20dictionaryvalue&exact_package=chromium&l=71 http://www.google.com/codesearch/p?hl=en#OAMlx_jo-ck/src/content/browser/host_zoom_map.cc&q=getdouble%20getinteger%20dictionaryvalue&exact_package=chromium&l=65 http://www.google.com/codesearch/p?hl=en#OAMlx_jo-ck/src/chrome/common/extensions/extension.cc&q=getdouble%20getinteger%20dictionaryvalue&exact_package=chromium&l=1887 http://www.google.com/codesearch/p?hl=en#OAMlx_jo-ck/src/chrome/browser/automation/automation_util.cc&q=getdouble%20getinteger%20dictionaryvalue&exact_package=chromium&l=298 ...
9 years, 8 months ago (2011-04-28 19:35:39 UTC) #2
Yusuke Sato
Done. Fixed chrome/browser/themes/browser_theme_pack.cc as well. jam: Could you review content/browser/host_zoom_map.cc? Thanks, Yusuke On 2011/04/28 19:35:39, ...
9 years, 7 months ago (2011-05-02 12:46:39 UTC) #3
jam
http://codereview.chromium.org/6901084/diff/5001/content/browser/host_zoom_map.cc File content/browser/host_zoom_map.cc (right): http://codereview.chromium.org/6901084/diff/5001/content/browser/host_zoom_map.cc#newcode82 content/browser/host_zoom_map.cc:82: success = host_zoom_dictionary->GetDoubleWithoutPathExpansion( why not only call GetDoubleWithoutPathExpansion? for ...
9 years, 7 months ago (2011-05-02 16:17:04 UTC) #4
Mihai Parparita -not on Chrome
http://codereview.chromium.org/6901084/diff/5001/chrome/browser/themes/browser_theme_pack.cc File chrome/browser/themes/browser_theme_pack.cc (right): http://codereview.chromium.org/6901084/diff/5001/chrome/browser/themes/browser_theme_pack.cc#newcode302 chrome/browser/themes/browser_theme_pack.cc:302: bool ValidDoubleValue(ListValue* tint_list, int index, double* out) { I ...
9 years, 7 months ago (2011-05-02 16:59:49 UTC) #5
Yusuke Sato
Fixed. Please take another look. http://codereview.chromium.org/6901084/diff/5001/chrome/browser/themes/browser_theme_pack.cc File chrome/browser/themes/browser_theme_pack.cc (right): http://codereview.chromium.org/6901084/diff/5001/chrome/browser/themes/browser_theme_pack.cc#newcode302 chrome/browser/themes/browser_theme_pack.cc:302: bool ValidDoubleValue(ListValue* tint_list, int ...
9 years, 7 months ago (2011-05-04 14:10:10 UTC) #6
jam
content lgtm
9 years, 7 months ago (2011-05-04 15:53:15 UTC) #7
Mihai Parparita -not on Chrome
9 years, 7 months ago (2011-05-04 16:54:30 UTC) #8
LGTM to me too, but you may need more OWNERS approvals.

Powered by Google App Engine
This is Rietveld 408576698