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

Issue 8588039: Remove "open in new tab" items from context menu if the process doesn't (Closed)

Created:
9 years, 1 month ago by Tom Sepez
Modified:
9 years ago
CC:
chromium-reviews, creis+watch_chromium.org, ajwong+watch_chromium.org, dpranke-watch+content_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Remove "open in new tab" items from context menu if the process doesn't have permission to open them directly. For example, right-click on a "chrome://" link in an ordinary window should show two items: Copy link location and inspect element, but a full menu from a WebUI window itself. NOTE: Fixing this issue requires a fix to ChildProcessSecurityPolicy, which as been silently too permissive. BUG=104466 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=113818

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 4

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Total comments: 1

Patch Set 11 : '' #

Patch Set 12 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -35 lines) Patch
M chrome/browser/chrome_content_browser_client.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.cc View 1 2 3 4 5 6 2 chunks +16 lines, -13 lines 0 comments Download
A chrome/browser/tab_contents/render_view_context_menu_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +82 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/child_process_security_policy.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -1 line 0 comments Download
M content/browser/child_process_security_policy_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +53 lines, -21 lines 0 comments Download
M content/browser/mock_content_browser_client.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/mock_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M content/shell/shell_content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/shell/shell_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
Tom Sepez
Since the browser_process_impl is already adding a scheme from its lofty position in /chrome to ...
9 years, 1 month ago (2011-11-17 21:29:31 UTC) #1
Tom Sepez
So it looks like ChildProcessSecurityPolicy has been permissive since the beginning, since it didn't realize ...
9 years, 1 month ago (2011-11-18 00:35:07 UTC) #2
Tom Sepez
The first place the WhiteListedExtension is tripping over this is: ChildProcessSecurityPolicy::SecurityState::CanRequestURL() [0x36c2116] ChildProcessSecurityPolicy::CanRequestURL() [0x36c19c2] RenderViewHost::FilterURL() ...
9 years, 1 month ago (2011-11-18 17:42:49 UTC) #3
Tom Sepez
Part of the problem is that when transitioning from a data: URL to the chrome://version ...
9 years, 1 month ago (2011-11-18 20:26:34 UTC) #4
Tom Sepez
RenderViewHostManager::UpdateRendererStateForNavigate() isn't setting pending_web_ui_ because chrome://version is a browser about handler, not a full-fledged web_ui. ...
9 years, 1 month ago (2011-11-18 20:59:54 UTC) #5
Cris Neckar
I am absolutely certain that I don't even approach understanding this well enough to review ...
9 years, 1 month ago (2011-11-18 22:15:57 UTC) #6
Tom Sepez
Adam, might as well kick off a review. Need to wait for LKGR to advance ...
9 years ago (2011-12-01 00:13:30 UTC) #7
abarth-chromium
Hum... Can you ping me again about this tomorrow? I'm a bit too frazzled right ...
9 years ago (2011-12-01 00:22:35 UTC) #8
Tom Sepez
http://codereview.chromium.org/8588039/diff/16001/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): http://codereview.chromium.org/8588039/diff/16001/chrome/browser/browser_process_impl.cc#newcode152 chrome/browser/browser_process_impl.cc:152: policy->RegisterWebSafeScheme(chrome::kChromeDevToolsScheme); Looks like this is in response to breaking ...
9 years ago (2011-12-01 00:43:35 UTC) #9
abarth-chromium
The ChromeUIScheme is handled by URLRequest.
9 years ago (2011-12-01 00:45:49 UTC) #10
tsepez (do not use)
Seems like it should be. But adding some tracing to child_process_security_policy (just to get this ...
9 years ago (2011-12-01 01:13:55 UTC) #11
abarth-chromium
I feel like this bug keeps coming up. The "chrome" scheme should be a handled ...
9 years ago (2011-12-01 01:32:52 UTC) #12
Tom Sepez
Here's why this is hard: There's a single static net::URLRequest::IsHandledURL() for the whole browser. Schemes ...
9 years ago (2011-12-02 02:07:36 UTC) #13
abarth-chromium
I believe there is only one profile per render process. Adam On Thu, Dec 1, ...
9 years ago (2011-12-02 21:25:46 UTC) #14
Tom Sepez
Some comments for Patch Set #10: Not happy with content API but lets do some ...
9 years ago (2011-12-07 22:34:40 UTC) #15
jam
api lgtm. just one question http://codereview.chromium.org/8588039/diff/31003/content/browser/mock_content_browser_client.cc File content/browser/mock_content_browser_client.cc (right): http://codereview.chromium.org/8588039/diff/31003/content/browser/mock_content_browser_client.cc#newcode94 content/browser/mock_content_browser_client.cc:94: return net::URLRequest::IsHandledURL(url); why isn't ...
9 years ago (2011-12-07 23:37:04 UTC) #16
Tom Sepez
yeah, I'll fix that. Just stuck it there to get a test in. Probably should ...
9 years ago (2011-12-07 23:43:01 UTC) #17
Tom Sepez
(Trying to avoid two calls to check the same thing since the one in profileIOData ...
9 years ago (2011-12-07 23:51:34 UTC) #18
Tom Sepez
But I guess there's no reason to believe that an embedder is always going to ...
9 years ago (2011-12-08 00:30:12 UTC) #19
Tom Sepez
I don't think that its right that CPSP can return different results depending upon whether ...
9 years ago (2011-12-08 22:06:01 UTC) #20
Tom Sepez
+AVI to get a reviewer for chrome/browser/tab_contents
9 years ago (2011-12-08 22:24:41 UTC) #21
Avi (use Gerrit)
On 2011/12/08 22:24:41, Tom Sepez wrote: > +AVI to get a reviewer for chrome/browser/tab_contents jam@ ...
9 years ago (2011-12-08 23:20:30 UTC) #22
Tom Sepez
John, would you take a final look when you get a chance? thanks.
9 years ago (2011-12-08 23:29:00 UTC) #23
jam
On 2011/12/08 23:29:00, Tom Sepez wrote: > John, would you take a final look when ...
9 years ago (2011-12-09 01:46:53 UTC) #24
Avi (use Gerrit)
9 years ago (2011-12-09 06:26:21 UTC) #25
OK, no problem.

Powered by Google App Engine
This is Rietveld 408576698