|
|
Created:
6 years, 3 months ago by Matt Giuca Modified:
6 years, 3 months ago CC:
chromium-reviews, grt+watch_chromium.org, wfh+watch_chromium.org, chrome-apps-syd-reviews_chromium.org, grt (UTC plus 2) Base URL:
https://chromium.googlesource.com/chromium/src.git@master Project:
chromium Visibility:
Public. |
DescriptionInstaller: Do not write "URL Protocol" to the ChromeHTML registry entry.
This means Chrome will no longer register itself as the handler for the
bogus "chromehtml" URL protocol. (Regular file associations should not
register the class name as a URL protocol.)
BUG=413051
Committed: https://crrev.com/144067db7db51b080b0ee29ec24bd2572cff6de2
Cr-Commit-Position: refs/heads/master@{#294941}
Patch Set 1 #
Total comments: 6
Messages
Total messages: 15 (4 generated)
mgiuca@chromium.org changed reviewers: + gab@chromium.org
Patchset #2 (id:20001) has been deleted
CC grt for his opinion. If we remove it there, we should also remove the same entry from "XPStyleUserProtocolEntries" and remove the constant altogether. https://codereview.chromium.org/559253002/diff/1/chrome/installer/util/shell_... File chrome/installer/util/shell_util.cc (left): https://codereview.chromium.org/559253002/diff/1/chrome/installer/util/shell_... chrome/installer/util/shell_util.cc:300: chrome_html_prog_id, ShellUtil::kRegUrlProtocol, base::string16())); From https://code.google.com/p/chromium/codesearch#chromium/src/chrome/installer/u... this appears to be intended to hook functionality in IE/Explorer. WDYT?
grt@chromium.org changed reviewers: + grt@chromium.org
https://codereview.chromium.org/559253002/diff/1/chrome/installer/util/shell_... File chrome/installer/util/shell_util.cc (left): https://codereview.chromium.org/559253002/diff/1/chrome/installer/util/shell_... chrome/installer/util/shell_util.cc:300: chrome_html_prog_id, ShellUtil::kRegUrlProtocol, base::string16())); On 2014/09/12 11:43:15, gab wrote: > From > https://code.google.com/p/chromium/codesearch#chromium/src/chrome/installer/u... > this appears to be intended to hook functionality in IE/Explorer. WDYT? If http://msdn.microsoft.com/library/ie/aa767914.aspx is to be believed, "URL Protocol" should be added to the HKCR\<proto> key where <proto> names an URL scheme (e.g., "mailto"). I can't think of any reason to put this value on any keys except those for URL schemes. It looks like ShellUtil::RegisterChromeForProtocol doesn't do this registration. I wonder if Chrome is actually being launched from IE when clicking on links it's the default handler for.
> If we remove it there, we should also remove the same entry from > "XPStyleUserProtocolEntries" and remove the constant altogether. Why? The registration in XPStyleUserProtocolEntries does exactly what it's supposed to: puts "URL Protocol" on Chrome's protocol entries (like "http" and "ftp"). I am removing the one that puts "URL Protocol" on Chrome's file extension entries (like ".html" and ".webp"), which is meaningless. https://codereview.chromium.org/559253002/diff/1/chrome/installer/util/shell_... File chrome/installer/util/shell_util.cc (left): https://codereview.chromium.org/559253002/diff/1/chrome/installer/util/shell_... chrome/installer/util/shell_util.cc:300: chrome_html_prog_id, ShellUtil::kRegUrlProtocol, base::string16())); I'll do some testing in IE on Monday. (I didn't realise this was for IE's benefit, but for other apps like Start -> Run that say "launch this URL".) It doesn't make sense for a web browser to respect this setting when the user clicks on a HTTP link; I would imagine IE only honours this when clicking on a link it can't handle (like a "steam://" URL).
https://codereview.chromium.org/559253002/diff/1/chrome/installer/util/shell_... File chrome/installer/util/shell_util.cc (left): https://codereview.chromium.org/559253002/diff/1/chrome/installer/util/shell_... chrome/installer/util/shell_util.cc:300: chrome_html_prog_id, ShellUtil::kRegUrlProtocol, base::string16())); On 2014/09/12 23:49:24, Matt Giuca wrote: > I'll do some testing in IE on Monday. (I didn't realise this was for IE's > benefit, but for other apps like Start -> Run that say "launch this URL".) It > doesn't make sense for a web browser to respect this setting when the user > clicks on a HTTP link; I would imagine IE only honours this when clicking on a > link it can't handle (like a "steam://" URL). Exactly. I wonder what would happen if Chrome is registered as the default protocol handler for, say, webcal://. Will clicking those links in IE launch Chrome? My guess is that the answer is no by accident. Would you find a way to trigger navigator.registerProtocolHandler so that Chrome registers itself as the handler for a protocol, then follow a link for that protocol in IE to see what happens? This is a great find. I think you may have come across a legitimate bug in rPH.
See comments -- registerProtocolHandler is working fine. The only issue is that URL Protocol should not be set in ChromeHTML. https://codereview.chromium.org/559253002/diff/1/chrome/installer/util/shell_... File chrome/installer/util/shell_util.cc (left): https://codereview.chromium.org/559253002/diff/1/chrome/installer/util/shell_... chrome/installer/util/shell_util.cc:300: chrome_html_prog_id, ShellUtil::kRegUrlProtocol, base::string16())); No, it works perfectly: 1. Go here: http://www.lookout.net/test/handler/ 2. Next to "Run ad hoc test", change "mailto" to "web+foo" and click the button. 3. In IE, type into the URL bar "web+foo:bar". It will correctly open Chrome and navigate to http://www.lookout.net/foo=web%2Bfoo%3Abar. ShellUtil::MakeChromeDefaultProtocolClient is called from navigator.registerProtocolHandler.
lgtm https://codereview.chromium.org/559253002/diff/1/chrome/installer/util/shell_... File chrome/installer/util/shell_util.cc (left): https://codereview.chromium.org/559253002/diff/1/chrome/installer/util/shell_... chrome/installer/util/shell_util.cc:300: chrome_html_prog_id, ShellUtil::kRegUrlProtocol, base::string16())); On 2014/09/15 00:52:01, Matt Giuca wrote: > No, it works perfectly: > > 1. Go here: http://www.lookout.net/test/handler/ > 2. Next to "Run ad hoc test", change "mailto" to "web+foo" and click the button. > 3. In IE, type into the URL bar "web+foo:bar". > > It will correctly open Chrome and navigate to > http://www.lookout.net/foo=web%2Bfoo%3Abar. > > ShellUtil::MakeChromeDefaultProtocolClient is called from > navigator.registerProtocolHandler. Awesome, thanks for confirming.
The CQ bit was checked by mgiuca@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/559253002/1
Message was sent while issue was closed.
Committed patchset #1 (id:1) as 1870a4e9fe0a676c63d2c2f37d277fbbe6251b13
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/144067db7db51b080b0ee29ec24bd2572cff6de2 Cr-Commit-Position: refs/heads/master@{#294941}
Message was sent while issue was closed.
Oh I see, so we're keeping it for protocol just dropping it for file associations, sorry for misunderstanding. lgtm! |