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

Issue 1617243004: Stop checking for null selectionModel field. (Closed)

Created:
4 years, 11 months ago by Kevin Bailey
Modified:
4 years, 10 months ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, michaelpg+watch-options_chromium.org, yusukes+watch_chromium.org, shuchen+watch_chromium.org, nona+watch_chromium.org, arv+watch_chromium.org, satorux1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Stop checking for null selectionModel field. It's apparent that the field is never null in this method, and if it were, we'd have to change much more. So make the code a little more clear and remove the test. BUG= Committed: https://crrev.com/711c45a18e07b784e873225f469efe1019c1a41c Cr-Commit-Position: refs/heads/master@{#374658}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Corrected comment #

Patch Set 3 : Bail if selectionModel not set #

Total comments: 5

Patch Set 4 : Added comment #

Patch Set 5 : Remove unneeded code #

Total comments: 2

Patch Set 6 : Restored correct code #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -3 lines) Patch
M chrome/browser/resources/options/language_list.js View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 23 (6 generated)
Kevin Bailey
Just an observation. https://codereview.chromium.org/1617243004/diff/1/chrome/browser/resources/options/language_list.js File chrome/browser/resources/options/language_list.js (left): https://codereview.chromium.org/1617243004/diff/1/chrome/browser/resources/options/language_list.js#oldcode407 chrome/browser/resources/options/language_list.js:407: this.selectionModel.selectedIndex = 0; While looking around, ...
4 years, 11 months ago (2016-01-22 15:12:50 UTC) #3
please use gerrit instead
https://codereview.chromium.org/1617243004/diff/1/chrome/browser/resources/options/language_list.js File chrome/browser/resources/options/language_list.js (left): https://codereview.chromium.org/1617243004/diff/1/chrome/browser/resources/options/language_list.js#oldcode407 chrome/browser/resources/options/language_list.js:407: this.selectionModel.selectedIndex = 0; On 2016/01/22 15:12:50, Kevin Bailey wrote: ...
4 years, 11 months ago (2016-01-22 18:31:09 UTC) #4
Dan Beam
https://codereview.chromium.org/1617243004/diff/1/chrome/browser/resources/options/language_list.js File chrome/browser/resources/options/language_list.js (left): https://codereview.chromium.org/1617243004/diff/1/chrome/browser/resources/options/language_list.js#oldcode406 chrome/browser/resources/options/language_list.js:406: // automatically, hence we manually select the first item ...
4 years, 11 months ago (2016-01-25 23:27:16 UTC) #5
Kevin Bailey
https://codereview.chromium.org/1617243004/diff/1/chrome/browser/resources/options/language_list.js File chrome/browser/resources/options/language_list.js (right): https://codereview.chromium.org/1617243004/diff/1/chrome/browser/resources/options/language_list.js#newcode398 chrome/browser/resources/options/language_list.js:398: // valid after the data model is loaded. This ...
4 years, 11 months ago (2016-01-26 15:00:40 UTC) #6
Dan Beam
please file a bug with repro steps as to how to trigger load_ for an ...
4 years, 11 months ago (2016-01-26 19:38:53 UTC) #7
Kevin Bailey
I don't know of a way to reproduce ::load_() getting called first. I simply noticed ...
4 years, 11 months ago (2016-01-26 22:21:46 UTC) #8
Dan Beam
On 2016/01/26 22:21:46, Kevin Bailey wrote: > I don't know of a way to reproduce ...
4 years, 11 months ago (2016-01-26 23:05:19 UTC) #9
Kevin Bailey
On 2016/01/26 23:05:19, Dan Beam wrote: > ... It's just as likely that it's never ...
4 years, 11 months ago (2016-01-27 17:50:26 UTC) #10
Dan Beam
this code was added here: https://codereview.chromium.org/2878079/diff/1/chrome/browser/resources/options/chromeos_language_list.js it doesn't seem like it was necessary to null-check ...
4 years, 11 months ago (2016-01-27 23:22:42 UTC) #11
Kevin Bailey
Cool, done.
4 years, 10 months ago (2016-01-28 16:43:19 UTC) #12
Kevin Bailey
Hi Dan, If you're still ok with this CL, can you approve? thanks! krb
4 years, 10 months ago (2016-02-02 21:05:36 UTC) #13
Dan Beam
https://codereview.chromium.org/1617243004/diff/80001/chrome/browser/resources/options/language_list.js File chrome/browser/resources/options/language_list.js (left): https://codereview.chromium.org/1617243004/diff/80001/chrome/browser/resources/options/language_list.js#oldcode407 chrome/browser/resources/options/language_list.js:407: this.selectionModel.selectedIndex = 0; why are you removing this?
4 years, 10 months ago (2016-02-09 19:14:47 UTC) #14
Kevin Bailey
https://codereview.chromium.org/1617243004/diff/80001/chrome/browser/resources/options/language_list.js File chrome/browser/resources/options/language_list.js (left): https://codereview.chromium.org/1617243004/diff/80001/chrome/browser/resources/options/language_list.js#oldcode407 chrome/browser/resources/options/language_list.js:407: this.selectionModel.selectedIndex = 0; On 2016/02/09 19:14:47, Dan Beam wrote: ...
4 years, 10 months ago (2016-02-09 22:19:07 UTC) #15
Dan Beam
lgtm, but can you update CL description?
4 years, 10 months ago (2016-02-10 00:27:48 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1617243004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1617243004/100001
4 years, 10 months ago (2016-02-10 14:16:21 UTC) #19
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 10 months ago (2016-02-10 14:54:17 UTC) #21
commit-bot: I haz the power
4 years, 10 months ago (2016-02-10 14:55:37 UTC) #23
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/711c45a18e07b784e873225f469efe1019c1a41c
Cr-Commit-Position: refs/heads/master@{#374658}

Powered by Google App Engine
This is Rietveld 408576698