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

Issue 8935016: Contributed by Eriq Augustine <eriq.augustine@gmail.com> (Closed)

Created:
9 years ago by Eriq
Modified:
8 years, 11 months ago
CC:
jstritar+watch_chromium.org, mihaip+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Ensure one radio button is always checked in extension context menus. This patch changes the behavior on all systems to match the behavior on Linux ie. there is always exactly one item selected in a run of radio items. This patch includes a unit test (ExtensionMenuManagerTest.SanitizeRadioButtons). BUG=49808 TEST=On any OS but Linux, load an extension that has a context menu without items selected by defuat. One item shuold be selected, but none are. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=117301

Patch Set 1 #

Total comments: 7

Patch Set 2 : '' #

Total comments: 4

Patch Set 3 : '' #

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -9 lines) Patch
M AUTHORS View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/extension_context_menu_api.cc View 1 2 3 4 chunks +16 lines, -7 lines 0 comments Download
M chrome/browser/extensions/extension_menu_manager.h View 1 2 3 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_menu_manager.cc View 1 2 3 7 chunks +73 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_menu_manager_unittest.cc View 1 2 3 1 chunk +92 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
clintstaley
"so that and run" => "so that a run" ?? In comments in extension_menu_manager.h Thanks ...
9 years ago (2011-12-14 23:39:48 UTC) #1
Aaron Boodman
+asargent (original author of this code) Hooray unit tests. It looks like ExtensionMenuManager already tries ...
9 years ago (2011-12-15 00:43:21 UTC) #2
Aaron Boodman
Also, you will need to submit a CLA if you haven't done that already: http://code.google.com/legal/individual-cla-v1.0.html
9 years ago (2011-12-15 00:44:01 UTC) #3
Aaron Boodman
Some style nits if we end up going with this solution. I'll leave the bigger ...
9 years ago (2011-12-15 00:53:55 UTC) #4
asargent_no_longer_on_chrome
>It looks like ExtensionMenuManager already tries to preserve this > invariant in some cases (e.g., ...
9 years ago (2011-12-15 18:38:39 UTC) #5
asargent_no_longer_on_chrome
Oh one nit about the CL description: the typical style is: "One line (<80 chars) ...
9 years ago (2011-12-15 18:42:12 UTC) #6
Eriq
On 2011/12/15 18:38:39, Antony Sargent wrote: > We could make the sanitize method > private, ...
9 years ago (2011-12-15 19:07:42 UTC) #7
asargent_no_longer_on_chrome
> If we do this, then we can make a much simpler sanitize method that ...
9 years ago (2011-12-15 19:34:33 UTC) #8
Eriq
Ok. Changed it as per Antony's suggestion.
8 years, 11 months ago (2012-01-05 23:20:37 UTC) #9
asargent_no_longer_on_chrome
Just a few minor issues. http://codereview.chromium.org/8935016/diff/14001/chrome/browser/extensions/extension_menu_manager.cc File chrome/browser/extensions/extension_menu_manager.cc (right): http://codereview.chromium.org/8935016/diff/14001/chrome/browser/extensions/extension_menu_manager.cc#newcode148 chrome/browser/extensions/extension_menu_manager.cc:148: } nit: other code ...
8 years, 11 months ago (2012-01-06 21:17:42 UTC) #10
eaugusti
> SanitizeRadioList(const ExtensionMenuItem::List& item_list); > Since you potentially modify some of |item_list|'s members by calling ...
8 years, 11 months ago (2012-01-07 02:14:40 UTC) #11
asargent_no_longer_on_chrome
LGTM > Using "ExtensionMenuItem::List*" instead of "const ExtensionMenuItem::List&" > would force me to directly reference ...
8 years, 11 months ago (2012-01-11 01:09:07 UTC) #12
Eriq
Ok, changed "ExtensionMenuItem::List*" back to "const ExtensionMenuItem::List&".
8 years, 11 months ago (2012-01-11 01:35:18 UTC) #13
asargent_no_longer_on_chrome
Great - do you need me to land this for you, or does the commit ...
8 years, 11 months ago (2012-01-11 18:02:52 UTC) #14
Eriq
I think I need you to land it for me. Thanks.
8 years, 11 months ago (2012-01-11 19:32:13 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/Eriq.Augustine@gmail.com/8935016/27001
8 years, 11 months ago (2012-01-11 20:56:55 UTC) #16
commit-bot: I haz the power
8 years, 11 months ago (2012-01-11 22:01:09 UTC) #17
Change committed as 117301

Powered by Google App Engine
This is Rietveld 408576698