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

Issue 6174009: Tidy up <select>s in tabbed options. (Closed)

Created:
9 years, 11 months ago by Evan Stade
Modified:
5 years, 6 months ago
CC:
chromium-reviews, arv (Not doing code reviews)
Visibility:
Public.

Description

Tidy up <select>s in tabbed options. Use pref ui for <select> where possible. This simplifies the zoom select and fixes the sync select. Also add more error checking. BUG=none TEST=manual Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71284

Patch Set 1 #

Total comments: 7

Patch Set 2 : fixes #

Patch Set 3 : don't anonymize #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -63 lines) Patch
M chrome/browser/dom_ui/options/advanced_options_handler.h View 3 chunks +0 lines, -7 lines 0 comments Download
M chrome/browser/dom_ui/options/advanced_options_handler.cc View 5 chunks +0 lines, -19 lines 0 comments Download
M chrome/browser/dom_ui/options/core_options_handler.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/dom_ui/options/core_options_handler.cc View 3 chunks +19 lines, -2 lines 0 comments Download
M chrome/browser/resources/options/advanced_options.html View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/resources/options/advanced_options.js View 2 chunks +0 lines, -16 lines 0 comments Download
M chrome/browser/resources/options/browser_options.html View 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/resources/options/browser_options.js View 1 2 1 chunk +1 line, -0 lines 1 comment Download
M chrome/browser/resources/options/clear_browser_data.html View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/options/clear_browser_data.js View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/resources/options/font_settings.html View 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/resources/options/personal_options.html View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/options/pref_ui.js View 1 2 chunks +24 lines, -8 lines 1 comment Download
M chrome/browser/resources/options/preferences.js View 1 chunk +13 lines, -0 lines 1 comment Download

Messages

Total messages: 6 (0 generated)
Evan Stade
9 years, 11 months ago (2011-01-12 22:40:45 UTC) #1
stuartmorgan
http://codereview.chromium.org/6174009/diff/1/chrome/browser/dom_ui/options/core_options_handler.cc File chrome/browser/dom_ui/options/core_options_handler.cc (right): http://codereview.chromium.org/6174009/diff/1/chrome/browser/dom_ui/options/core_options_handler.cc#newcode189 chrome/browser/dom_ui/options/core_options_handler.cc:189: CHECK(base::StringToInt(value_string, &int_value)); We're going to crash the whole browser ...
9 years, 11 months ago (2011-01-12 22:59:41 UTC) #2
Evan Stade
http://codereview.chromium.org/6174009/diff/1/chrome/browser/dom_ui/options/core_options_handler.cc File chrome/browser/dom_ui/options/core_options_handler.cc (right): http://codereview.chromium.org/6174009/diff/1/chrome/browser/dom_ui/options/core_options_handler.cc#newcode189 chrome/browser/dom_ui/options/core_options_handler.cc:189: CHECK(base::StringToInt(value_string, &int_value)); On 2011/01/12 22:59:41, stuartmorgan wrote: > We're ...
9 years, 11 months ago (2011-01-12 23:19:20 UTC) #3
stuartmorgan
Okay, LGTM with stub removed. http://codereview.chromium.org/6174009/diff/1/chrome/browser/resources/options/browser_options.js File chrome/browser/resources/options/browser_options.js (right): http://codereview.chromium.org/6174009/diff/1/chrome/browser/resources/options/browser_options.js#newcode361 chrome/browser/resources/options/browser_options.js:361: setDefaultSearchEngine: function() { On ...
9 years, 11 months ago (2011-01-12 23:30:09 UTC) #4
Evan Stade
ok. restored the function. Changed the getter/setter to the better style (also updated getter/setter for ...
9 years, 11 months ago (2011-01-12 23:38:47 UTC) #5
arv (Not doing code reviews)
9 years, 11 months ago (2011-01-13 20:51:10 UTC) #6
LGTM

http://codereview.chromium.org/6174009/diff/11001/chrome/browser/resources/op...
File chrome/browser/resources/options/browser_options.js (right):

http://codereview.chromium.org/6174009/diff/11001/chrome/browser/resources/op...
chrome/browser/resources/options/browser_options.js:65:
$('defaultSearchEngine').onchange = this.setDefaultSearchEngine;
This looks a bit scary since we lose the 'this' pointer here. I see that
setDefaultSearchEngine does not depend on 'this' so it will work but things
might break after some refactoring.

http://codereview.chromium.org/6174009/diff/11001/chrome/browser/resources/op...
File chrome/browser/resources/options/pref_ui.js (right):

http://codereview.chromium.org/6174009/diff/11001/chrome/browser/resources/op...
chrome/browser/resources/options/pref_ui.js:442: get dataType() {
There is a macro for this.

cr.defineProperty(PrefSelect, 'dataType', cr.PropertyKind.ATTR);

http://codereview.chromium.org/6174009/diff/11001/chrome/browser/resources/op...
File chrome/browser/resources/options/preferences.js (right):

http://codereview.chromium.org/6174009/diff/11001/chrome/browser/resources/op...
chrome/browser/resources/options/preferences.js:73: var arguments = [name,
String(value)];
rename arguments (not forwards compatible with strict mode)

Powered by Google App Engine
This is Rietveld 408576698