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 12299013: Fix top-level context menus sorting by name (Closed)

Created:
7 years, 10 months ago by François Beaufort
Modified:
7 years, 6 months ago
CC:
chromium-reviews, Aaron Boodman, ajwong+watch_chromium.org, creis+watch_chromium.org, chromium-apps-reviews_chromium.org
Base URL:
https://src.chromium.org/chrome/trunk/src/
Visibility:
Public.

Description

Fix top-level context menus sorting by name BUG=174878 TEST= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=205793

Patch Set 1 #

Total comments: 22

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Patch Set 4 : #

Total comments: 8

Patch Set 5 : Added GetRelevantExtensionTopLevelItems() #

Total comments: 13

Patch Set 6 : Addressed style guide issues #

Total comments: 5

Patch Set 7 : Added localization to context menu titles sorting #

Patch Set 8 : Used const #

Total comments: 9

Patch Set 9 : Fixed last nits #

Patch Set 10 : Removed hard CHECK #

Total comments: 3

Patch Set 11 : I have no excuse here... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+268 lines, -28 lines) Patch
M chrome/browser/extensions/context_menu_matcher.h View 1 2 3 4 5 6 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/extensions/context_menu_matcher.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +54 lines, -11 lines 0 comments Download
M chrome/browser/extensions/extension_context_menu_browsertest.cc View 1 2 3 4 5 2 chunks +68 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.cc View 1 2 3 4 5 6 7 8 1 chunk +21 lines, -17 lines 0 comments Download
A chrome/test/data/extensions/context_menus/top_level/multi4/background.js View 1 2 3 4 5 6 7 8 1 chunk +15 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/context_menus/top_level/multi4/manifest.json View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/context_menus/top_level/multi5/background.js View 1 2 3 4 5 6 7 8 1 chunk +15 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/context_menus/top_level/multi5/manifest.json View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/context_menus/top_level/single1/background.js View 1 2 3 4 5 6 7 8 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/context_menus/top_level/single1/manifest.json View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/context_menus/top_level/single2/background.js View 1 2 3 4 5 6 7 8 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/context_menus/top_level/single2/manifest.json View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/context_menus/top_level/single3/background.js View 1 2 3 4 5 6 7 8 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/context_menus/top_level/single3/manifest.json View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 41 (0 generated)
François Beaufort
As agreed at crbug.com/174878, here's a patch to fix top-level context menus sorting by name. ...
7 years, 10 months ago (2013-02-18 13:46:37 UTC) #1
Yoyo Zhou
Thanks for the patch! If you haven't already, please review the Chromium style guide: http://dev.chromium.org/developers/coding-style ...
7 years, 10 months ago (2013-02-19 19:00:50 UTC) #2
François Beaufort
7 years, 10 months ago (2013-02-20 11:29:00 UTC) #3
François Beaufort
Thank you for reviewing this code. You'll notice a new clause in an "if" to ...
7 years, 10 months ago (2013-02-20 11:32:06 UTC) #4
Yoyo Zhou
Sorry about taking this long to reply; it got pushed out of my working set. ...
7 years, 9 months ago (2013-03-06 20:18:58 UTC) #5
François Beaufort
I missed your email Yoyo. I'm so sorry! I've added a test like you said. ...
7 years, 9 months ago (2013-03-20 16:17:33 UTC) #6
please use gerrit instead
Thank you for working on the patch and sorry for the drive-by :-) https://codereview.chromium.org/12299013/diff/6001/chrome/browser/tab_contents/render_view_context_menu.cc File ...
7 years, 9 months ago (2013-03-20 16:29:12 UTC) #7
Yoyo Zhou
> I have to define an extension variable in the main function since I need ...
7 years, 9 months ago (2013-03-20 21:54:13 UTC) #8
François Beaufort
I've finally took some time for this issue. Biggest change is the fact I've created ...
7 years, 7 months ago (2013-05-07 15:51:53 UTC) #9
Yoyo Zhou
Looks better. Just some style issues to address. You might want to look over http://www.chromium.org/developers/coding-style ...
7 years, 7 months ago (2013-05-08 22:54:30 UTC) #10
François Beaufort
Addresses all the style guide issues and learnt a lot of stuff. Thanks! https://codereview.chromium.org/12299013/diff/34001/chrome/browser/extensions/context_menu_matcher.cc File ...
7 years, 6 months ago (2013-06-04 13:09:20 UTC) #11
Yoyo Zhou
LGTM. Thanks!
7 years, 6 months ago (2013-06-04 21:39:26 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/beaufort.francois@gmail.com/12299013/41001
7 years, 6 months ago (2013-06-05 08:08:56 UTC) #13
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=6855
7 years, 6 months ago (2013-06-05 08:22:33 UTC) #14
François Beaufort
On 2013/06/05 08:22:33, I haz the power (commit-bot) wrote: > Retried try job too often ...
7 years, 6 months ago (2013-06-05 08:51:32 UTC) #15
Avi (use Gerrit)
UI strings should be string16. https://chromiumcodereview.appspot.com/12299013/diff/41001/chrome/browser/extensions/context_menu_matcher.cc File chrome/browser/extensions/context_menu_matcher.cc (right): https://chromiumcodereview.appspot.com/12299013/diff/41001/chrome/browser/extensions/context_menu_matcher.cc#newcode113 chrome/browser/extensions/context_menu_matcher.cc:113: title = UTF16ToUTF8(item->TitleWithReplacement( MenuItem ...
7 years, 6 months ago (2013-06-05 14:34:10 UTC) #16
François Beaufort
Hope my remarks do make sense https://chromiumcodereview.appspot.com/12299013/diff/41001/chrome/browser/extensions/context_menu_matcher.cc File chrome/browser/extensions/context_menu_matcher.cc (right): https://chromiumcodereview.appspot.com/12299013/diff/41001/chrome/browser/extensions/context_menu_matcher.cc#newcode113 chrome/browser/extensions/context_menu_matcher.cc:113: title = UTF16ToUTF8(item->TitleWithReplacement( ...
7 years, 6 months ago (2013-06-06 09:07:37 UTC) #17
Avi (use Gerrit)
OK, so I'm even less happy. This sorts only vaguely correctly for English, and completely ...
7 years, 6 months ago (2013-06-06 14:42:27 UTC) #18
Avi (use Gerrit)
On 2013/06/06 14:42:27, Avi wrote: > OK, so I'm even less happy. This sorts only ...
7 years, 6 months ago (2013-06-06 14:49:24 UTC) #19
Avi (use Gerrit)
OK, so: - Switch to base::string16 - Use l10n_util::SortStrings16 (found in ui/base/l10n/l10n_util.h) (Examples at https://code.google.com/p/chromium/codesearch#search/&q=SortStrings16 ...
7 years, 6 months ago (2013-06-06 14:57:19 UTC) #20
François Beaufort
Thank you! François Beaufort | beaufort.francois@gmail.com On Thu, Jun 6, 2013 at 4:57 PM, <avi@chromium.org> ...
7 years, 6 months ago (2013-06-06 14:58:07 UTC) #21
François Beaufort
I added localization to context menu titles sorting based on your feedback.
7 years, 6 months ago (2013-06-07 13:09:25 UTC) #22
Avi (use Gerrit)
LGTM with formatting nits fixed. https://chromiumcodereview.appspot.com/12299013/diff/65001/chrome/browser/extensions/context_menu_matcher.cc File chrome/browser/extensions/context_menu_matcher.cc (left): https://chromiumcodereview.appspot.com/12299013/diff/65001/chrome/browser/extensions/context_menu_matcher.cc#oldcode28 chrome/browser/extensions/context_menu_matcher.cc:28: Please don't drop this ...
7 years, 6 months ago (2013-06-07 21:05:48 UTC) #23
François Beaufort
Thank you again Yoyo and Avi for your insightful comments. https://chromiumcodereview.appspot.com/12299013/diff/65001/chrome/browser/extensions/context_menu_matcher.cc File chrome/browser/extensions/context_menu_matcher.cc (left): https://chromiumcodereview.appspot.com/12299013/diff/65001/chrome/browser/extensions/context_menu_matcher.cc#oldcode28 ...
7 years, 6 months ago (2013-06-10 12:41:11 UTC) #24
Avi (use Gerrit)
SLGTM https://chromiumcodereview.appspot.com/12299013/diff/65001/chrome/browser/tab_contents/render_view_context_menu.cc File chrome/browser/tab_contents/render_view_context_menu.cc (right): https://chromiumcodereview.appspot.com/12299013/diff/65001/chrome/browser/tab_contents/render_view_context_menu.cc#newcode532 chrome/browser/tab_contents/render_view_context_menu.cc:532: l10n_util::SortStrings16(app_locale, &sorted_menu_titles); What does "done" mean here? :)
7 years, 6 months ago (2013-06-10 14:12:28 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/beaufort.francois@gmail.com/12299013/69001
7 years, 6 months ago (2013-06-10 14:15:49 UTC) #26
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=136327
7 years, 6 months ago (2013-06-10 15:41:27 UTC) #27
François Beaufort
On 2013/06/10 15:41:27, I haz the power (commit-bot) wrote: > Retried try job too often ...
7 years, 6 months ago (2013-06-10 16:02:57 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/beaufort.francois@gmail.com/12299013/87002
7 years, 6 months ago (2013-06-11 09:52:20 UTC) #29
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 6 months ago (2013-06-11 10:47:25 UTC) #30
François Beaufort
On 2013/06/11 10:47:25, I haz the power (commit-bot) wrote: > Sorry for I got bad ...
7 years, 6 months ago (2013-06-11 12:03:43 UTC) #31
Avi (use Gerrit)
https://codereview.chromium.org/12299013/diff/87002/chrome/browser/extensions/context_menu_matcher.cc File chrome/browser/extensions/context_menu_matcher.cc (right): https://codereview.chromium.org/12299013/diff/87002/chrome/browser/extensions/context_menu_matcher.cc#newcode166 chrome/browser/extensions/context_menu_matcher.cc:166: can_cross_incognito); Oh, wow. I think that caught a bug. ...
7 years, 6 months ago (2013-06-11 14:14:16 UTC) #32
Avi (use Gerrit)
On 2013/06/11 12:03:43, François Beaufort wrote: > : warning C4800: 'bool *' : forcing value ...
7 years, 6 months ago (2013-06-11 14:17:59 UTC) #33
François Beaufort
https://codereview.chromium.org/12299013/diff/87002/chrome/browser/extensions/context_menu_matcher.cc File chrome/browser/extensions/context_menu_matcher.cc (right): https://codereview.chromium.org/12299013/diff/87002/chrome/browser/extensions/context_menu_matcher.cc#newcode166 chrome/browser/extensions/context_menu_matcher.cc:166: can_cross_incognito); I have no excuse here. I'm going to ...
7 years, 6 months ago (2013-06-11 14:41:22 UTC) #34
Avi (use Gerrit)
https://codereview.chromium.org/12299013/diff/87002/chrome/browser/extensions/context_menu_matcher.cc File chrome/browser/extensions/context_menu_matcher.cc (right): https://codereview.chromium.org/12299013/diff/87002/chrome/browser/extensions/context_menu_matcher.cc#newcode166 chrome/browser/extensions/context_menu_matcher.cc:166: can_cross_incognito); On 2013/06/11 14:41:22, François Beaufort wrote: > I'm ...
7 years, 6 months ago (2013-06-11 15:39:56 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/beaufort.francois@gmail.com/12299013/116001
7 years, 6 months ago (2013-06-11 15:40:59 UTC) #36
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 6 months ago (2013-06-11 17:07:01 UTC) #37
François Beaufort
On 2013/06/11 17:07:01, I haz the power (commit-bot) wrote: > Step "update" is always a ...
7 years, 6 months ago (2013-06-12 05:49:28 UTC) #38
Avi (use Gerrit)
Yeah, just keep mashing the commit button if the build fails and it's clearly not ...
7 years, 6 months ago (2013-06-12 14:24:22 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/beaufort.francois@gmail.com/12299013/116001
7 years, 6 months ago (2013-06-12 14:33:45 UTC) #40
commit-bot: I haz the power
7 years, 6 months ago (2013-06-12 15:31:36 UTC) #41
Message was sent while issue was closed.
Change committed as 205793

Powered by Google App Engine
This is Rietveld 408576698