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

Issue 6410115: Adds navigator.registerProtocolHandler. (Closed)

Created:
9 years, 10 months ago by koz (OOO until 15th September)
Modified:
9 years, 5 months ago
Reviewers:
tony, jam, tc, ojan
CC:
chromium-reviews, cbentzel+watch_chromium.org, Paweł Hajdan Jr., darin-cc_chromium.org, brettw-cc_chromium.org, willchan no longer on Chromium, eroman
Visibility:
Public.

Description

Adds navigator.registerProtocolHandler. BUG=11359 TEST=None at the moment Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=75681

Patch Set 1 #

Total comments: 48

Patch Set 2 : gs #

Patch Set 3 : Responded to comments, simplified file format. #

Total comments: 18

Patch Set 4 : Responded to comments, prevents rph on privileged protocols. #

Total comments: 20

Patch Set 5 : Responded to comments. #

Total comments: 2

Patch Set 6 : Responded to comments, synced. #

Patch Set 7 : Fixed compile error in testing_profile.cc and minor nits. #

Patch Set 8 : Sync'd, disallow non-same origin rph, adds hostname to the infobar. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+647 lines, -1 line) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 1 chunk +21 lines, -0 lines 0 comments Download
A chrome/browser/custom_handlers/protocol_handler.h View 1 2 3 4 1 chunk +47 lines, -0 lines 0 comments Download
A chrome/browser/custom_handlers/protocol_handler.cc View 1 2 3 4 5 1 chunk +57 lines, -0 lines 0 comments Download
A chrome/browser/custom_handlers/protocol_handler_registry.h View 1 2 3 4 1 chunk +93 lines, -0 lines 0 comments Download
A chrome/browser/custom_handlers/protocol_handler_registry.cc View 1 2 3 4 1 chunk +129 lines, -0 lines 0 comments Download
A chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h View 1 2 3 4 5 6 7 1 chunk +51 lines, -0 lines 0 comments Download
A chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc View 1 2 3 4 5 6 7 1 chunk +126 lines, -0 lines 0 comments Download
M chrome/browser/net/chrome_url_request_context.h View 1 2 3 4 5 4 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile.h View 1 2 3 4 5 6 7 3 chunks +8 lines, -1 line 0 comments Download
M chrome/browser/profiles/profile.cc View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl.h View 1 2 3 4 5 6 7 3 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 3 4 5 6 7 4 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 2 chunks +2 lines, -0 lines 1 comment Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/renderer/render_view.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/renderer/render_view.cc View 1 2 3 4 5 6 7 1 chunk +16 lines, -0 lines 0 comments Download
M chrome/test/testing_profile.h View 1 2 3 4 5 6 7 4 chunks +10 lines, -0 lines 0 comments Download
M chrome/test/testing_profile.cc View 1 2 3 4 5 6 7 3 chunks +9 lines, -0 lines 0 comments Download
M content/browser/tab_contents/tab_contents.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/tab_contents/tab_contents.cc View 1 2 3 4 5 6 7 3 chunks +17 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
koz (OOO until 15th September)
9 years, 10 months ago (2011-02-07 05:44:51 UTC) #1
tony
I realize this is a work in progress, but since you sent it for review ...
9 years, 10 months ago (2011-02-07 20:51:44 UTC) #2
koz (OOO until 15th September)
On 2011/02/07 20:51:44, tony wrote: > I realize this is a work in progress, but ...
9 years, 10 months ago (2011-02-13 22:33:29 UTC) #3
koz (OOO until 15th September)
http://codereview.chromium.org/6410115/diff/1/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): http://codereview.chromium.org/6410115/diff/1/chrome/app/generated_resources.grd#newcode11287 chrome/app/generated_resources.grd:11287: Would you like to use "<ph name="HANDLER_TITLE">$1<ex>Google Search</ex></ph>" to ...
9 years, 10 months ago (2011-02-13 22:33:48 UTC) #4
tony
I asked aa and arv about calling registerProtocolHandler from a background page. Doing nothing for ...
9 years, 10 months ago (2011-02-14 23:40:07 UTC) #5
koz (OOO until 15th September)
Thanks for the review! I've got some checks that I can put into WebKit to ...
9 years, 10 months ago (2011-02-15 03:37:27 UTC) #6
tony
LGTM! I think you're right that we don't need a command line flag and we ...
9 years, 10 months ago (2011-02-15 18:03:47 UTC) #7
jam
http://codereview.chromium.org/6410115/diff/17002/chrome/browser/custom_handlers/protocol_handler_registry.h File chrome/browser/custom_handlers/protocol_handler_registry.h (right): http://codereview.chromium.org/6410115/diff/17002/chrome/browser/custom_handlers/protocol_handler_registry.h#newcode25 chrome/browser/custom_handlers/protocol_handler_registry.h:25: class ProtocolHandler { this class should just go into ...
9 years, 10 months ago (2011-02-15 18:48:39 UTC) #8
koz (OOO until 15th September)
Thanks for the review, John! http://codereview.chromium.org/6410115/diff/17002/chrome/browser/custom_handlers/protocol_handler_registry.h File chrome/browser/custom_handlers/protocol_handler_registry.h (right): http://codereview.chromium.org/6410115/diff/17002/chrome/browser/custom_handlers/protocol_handler_registry.h#newcode25 chrome/browser/custom_handlers/protocol_handler_registry.h:25: class ProtocolHandler { On ...
9 years, 10 months ago (2011-02-16 03:37:48 UTC) #9
koz (OOO until 15th September)
Great! Thanks for reviewing this and for answering my numerous questions along the way, it's ...
9 years, 10 months ago (2011-02-16 03:51:37 UTC) #10
jam
lgtm http://codereview.chromium.org/6410115/diff/19002/chrome/browser/custom_handlers/protocol_handler.cc File chrome/browser/custom_handlers/protocol_handler.cc (right): http://codereview.chromium.org/6410115/diff/19002/chrome/browser/custom_handlers/protocol_handler.cc#newcode10 chrome/browser/custom_handlers/protocol_handler.cc:10: nit: extra line
9 years, 10 months ago (2011-02-16 18:29:37 UTC) #11
koz (OOO until 15th September)
http://codereview.chromium.org/6410115/diff/19002/chrome/browser/custom_handlers/protocol_handler.cc File chrome/browser/custom_handlers/protocol_handler.cc (right): http://codereview.chromium.org/6410115/diff/19002/chrome/browser/custom_handlers/protocol_handler.cc#newcode10 chrome/browser/custom_handlers/protocol_handler.cc:10: On 2011/02/16 18:29:37, John Abd-El-Malek wrote: > nit: extra ...
9 years, 10 months ago (2011-02-17 03:32:03 UTC) #12
tony
LGTM2 http://codereview.chromium.org/6410115/diff/25001/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): http://codereview.chromium.org/6410115/diff/25001/chrome/browser/profiles/profile_io_data.cc#newcode259 chrome/browser/profiles/profile_io_data.cc:259: context->set_protocol_handler_registry(profile_params.protocol_handler_registry); Nit: 80 cols
9 years, 10 months ago (2011-02-22 17:52:08 UTC) #13
willchan no longer on Chromium
Hey, I just saw this due to a refcounting bug in it. I don't see ...
9 years, 10 months ago (2011-02-24 20:57:10 UTC) #14
tony
The refcount bug is tracked by http://code.google.com/p/chromium/issues/detail?id=73972 . Can you open another bug for the ...
9 years, 10 months ago (2011-02-24 21:35:24 UTC) #15
willchan no longer on Chromium
9 years, 10 months ago (2011-02-24 22:00:21 UTC) #16
Filed http://code.google.com/p/chromium/issues/detail?id=74063.

On Thu, Feb 24, 2011 at 1:35 PM,  <tony@chromium.org> wrote:
> The refcount bug is tracked by
> http://code.google.com/p/chromium/issues/detail?id=73972 .
>
> Can you open another bug for the bad cast?
>
> On 2011/02/24 20:57:10, willchan wrote:
>>
>> Hey, I just saw this due to a refcounting bug in it. I don't see anyone in
>> chrome/browser/net/OWNERS on the reviewers list here, yet
>> ChromeURLRequestContext is being changed. The refcounting needs to be
>> threadsafe. Also, it looks like you're doing a
>> static_cast<ChromeURLRequestContext*>(request->context()) here. That's
>> wrong.
>> Anyone trying to test out the URI via chrome://net-internals/#tests is
>> going
>
> to
>>
>> create a subtype of URLRequestContext that is NOT ChromeURLRequestContext,
>> and
>> it will crash on your attempt to cast it to ChromeURLRequestContext.
>
>> It looks like you are trying to use URLRequest::ProtocolFactory. I
>> recommend
>> that when you try to use the net/ library, you ask someone in net/OWNERS
>> to
>
> see
>>
>> if your usage is correct. Your current usage will lead to crashes. Can you
>> fix
>> this?
>
>
>
> http://codereview.chromium.org/6410115/
>

Powered by Google App Engine
This is Rietveld 408576698