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

Unified Diff: chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm

Issue 2341213004: permissions prompt: use unicode hostname, not IDN (Closed)
Patch Set: display_url -> displayUrl Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/website_settings/permission_prompt_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm b/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
index adf8e17fe63225bae01d16570cab452ee81fe93d..a7522922add2a5bd695855746e3d9926b75cd67c 100644
--- a/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
@@ -36,6 +36,7 @@
#include "components/prefs/pref_service.h"
#include "components/strings/grit/components_strings.h"
#include "components/url_formatter/elide_url.h"
+#include "components/url_formatter/url_formatter.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/user_metrics.h"
#include "skia/ext/skia_utils_mac.h"
@@ -553,11 +554,12 @@ const NSInteger kFullscreenLeftOffset = 40;
[titleView setBezeled:NO];
[titleView setEditable:NO];
[titleView setSelectable:NO];
+ base::string16 displayUrl = url_formatter::FormatUrlForSecurityDisplay(
+ origin, url_formatter::SchemeDisplay::OMIT_CRYPTOGRAPHIC);
+ if (base::IsStringASCII(displayUrl))
jungshik at Google 2016/09/27 17:58:00 Here does the url have any query or path part or i
+ displayUrl = url_formatter::IDNToUnicode(base::UTF16ToASCII(displayUrl));
[titleView setStringValue:l10n_util::GetNSStringF(
- IDS_PERMISSIONS_BUBBLE_PROMPT,
- url_formatter::FormatUrlForSecurityDisplay(
- origin, url_formatter::SchemeDisplay::
- OMIT_CRYPTOGRAPHIC))];
+ IDS_PERMISSIONS_BUBBLE_PROMPT, displayUrl)];
[titleView setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
[titleView sizeToFit];
NSRect titleFrame = [titleView frame];
« no previous file with comments | « no previous file | chrome/browser/ui/views/website_settings/permission_prompt_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698