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

Issue 2341213004: permissions prompt: use unicode hostname, not IDN (Closed)

Created:
4 years, 3 months ago by Elly Fong-Jones
Modified:
4 years, 2 months ago
CC:
chromium-reviews, tfarina, markusheintz_, msramek+watch_chromium.org, raymes+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

permissions prompt: use unicode hostname, not IDN The origin in a GURL is always IDN, which means that the permissions prompt shows punycode instead of the actual unicode hostname. BUG=630667

Patch Set 1 #

Total comments: 2

Patch Set 2 : display_url -> displayUrl #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -4 lines) Patch
M chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm View 1 2 chunks +6 lines, -4 lines 1 comment Download
M chrome/browser/ui/views/website_settings/permission_prompt_impl.cc View 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (5 generated)
Elly Fong-Jones
felt: ptal? I'm not sure if it's always safe to do this unconditional IDN -> ...
4 years, 3 months ago (2016-09-16 11:19:54 UTC) #3
Elly Fong-Jones
ping? :)
4 years, 3 months ago (2016-09-21 15:16:40 UTC) #4
Elly Fong-Jones
rsesek: ptal? :)
4 years, 3 months ago (2016-09-23 17:10:09 UTC) #6
Robert Sesek
1 nit https://codereview.chromium.org/2341213004/diff/1/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm File chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm (right): https://codereview.chromium.org/2341213004/diff/1/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm#newcode557 chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm:557: base::string16 display_url = url_formatter::FormatUrlForSecurityDisplay( naming: camelCase in ...
4 years, 3 months ago (2016-09-23 17:13:11 UTC) #7
Elly Fong-Jones
rsesek, ptal for cocoa owner :) felt, ptal for views owner :) https://codereview.chromium.org/2341213004/diff/1/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm File chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm ...
4 years, 3 months ago (2016-09-23 17:19:08 UTC) #9
Robert Sesek
LGTM
4 years, 3 months ago (2016-09-23 17:21:31 UTC) #10
felt
lgtm
4 years, 2 months ago (2016-09-27 11:23:07 UTC) #11
felt
This looks convincingly right... but to be honest I have no experience with unicode and ...
4 years, 2 months ago (2016-09-27 11:26:16 UTC) #12
Elly Fong-Jones
On 2016/09/27 11:26:16, felt wrote: > This looks convincingly right... but to be honest I ...
4 years, 2 months ago (2016-09-27 16:05:48 UTC) #13
jungshik at Google
On 2016/09/27 16:05:48, Elly Fong-Jones wrote: > On 2016/09/27 11:26:16, felt wrote: > > This ...
4 years, 2 months ago (2016-09-27 17:51:16 UTC) #14
jungshik at Google
4 years, 2 months ago (2016-09-27 17:58:00 UTC) #16
I have a second thought (I should have looked at it more carefully). Let's
change FormatUrlForSecurityDisplay after sec review.

https://codereview.chromium.org/2341213004/diff/20001/chrome/browser/ui/cocoa...
File chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
(right):

https://codereview.chromium.org/2341213004/diff/20001/chrome/browser/ui/cocoa...
chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm:559: if
(base::IsStringASCII(displayUrl))
Here does the url have any query or path part or is it just 'scheme + hostname'?
 Hmm...   even if it does not have path/query, calling IDNToUnicode over a whole
URL is odd (although likely to work in this case)  because IDNToUnicode only
deals with a hostname. 

So, I think we'd better tackle this issue in FormatUrlForSecurityDisplay.

Powered by Google App Engine
This is Rietveld 408576698