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

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

Issue 1976863002: Update ChooserBubbleUiController to use FormatOriginForSecurityDisplay (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated ChooserBubbleUiController to use FormatOriginForSecurityDisplay Created 4 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm b/chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm
index 899504243f081e3036ddb03714fe20d57cabed9c..0e2ab295eb6ed9e6803d18fe4a378d1c4ade6158 100644
--- a/chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm
+++ b/chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm
@@ -26,6 +26,7 @@
#import "chrome/browser/ui/cocoa/info_bubble_window.h"
#import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
#include "chrome/grit/generated_resources.h"
+#include "components/url_formatter/elide_url.h"
#include "content/public/browser/native_web_keyboard_event.h"
#import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTweaker.h"
#include "ui/base/cocoa/cocoa_base_utils.h"
@@ -454,11 +455,12 @@ std::unique_ptr<BubbleUi> ChooserBubbleController::BuildBubbleUi() {
[titleView setBezeled:NO];
[titleView setEditable:NO];
[titleView setSelectable:NO];
- [titleView
- setStringValue:l10n_util::GetNSStringF(
- IDS_CHOOSER_BUBBLE_PROMPT,
- base::ASCIIToUTF16(
- chooserBubbleController_->GetOrigin().host()))];
+ [titleView setStringValue:
+ l10n_util::GetNSStringF(
+ IDS_CHOOSER_BUBBLE_PROMPT,
+ url_formatter::FormatOriginForSecurityDisplay(
+ chooserBubbleController_->GetOrigin(),
+ url_formatter::SchemeDisplay::OMIT_CRYPTOGRAPHIC))];
[titleView setFont:[NSFont systemFontOfSize:[NSFont systemFontSize]]];
// The height is arbitrary as it will be adjusted later.
[titleView setFrameSize:NSMakeSize(kChooserBubbleWidth - 2 * kMarginX, 0.0f)];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698