Chromium Code Reviews| Index: chrome/browser/ui/content_settings/content_setting_bubble_model.cc |
| diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc |
| index bdc7df799563be57ae400c71306f41395bd38395..6a592793974f37208e50ca8f2b0b5d7e96b67529 100644 |
| --- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc |
| +++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc |
| @@ -21,6 +21,7 @@ |
| #include "chrome/browser/ui/browser_navigator.h" |
| #include "chrome/browser/ui/collected_cookies_infobar_delegate.h" |
| #include "chrome/browser/ui/content_settings/content_setting_bubble_model_delegate.h" |
| +#include "chrome/browser/ui/elide_url.h" |
| #include "chrome/common/chrome_switches.h" |
| #include "chrome/common/pref_names.h" |
| #include "chrome/common/render_messages.h" |
| @@ -274,12 +275,8 @@ bool ContentSettingSingleRadioGroup::settings_changed() const { |
| // content type and setting the default value based on the content setting. |
| void ContentSettingSingleRadioGroup::SetRadioGroup() { |
| GURL url = web_contents()->GetURL(); |
| - base::string16 display_host; |
| - net::AppendFormattedHost( |
| - url, |
| - profile()->GetPrefs()->GetString(prefs::kAcceptLanguages), |
| - &display_host); |
| - |
| + base::string16 display_host = FormatOriginForDisplay( |
| + url, profile()->GetPrefs()->GetString(prefs::kAcceptLanguages), false); |
| if (display_host.empty()) |
| display_host = base::ASCIIToUTF16(url.spec()); |
| @@ -558,7 +555,7 @@ ContentSettingPopupBubbleModel::ContentSettingPopupBubbleModel( |
| ->GetBlockedPopupRequests(); |
| for (const std::pair<int32, GURL>& blocked_popup : blocked_popups) { |
| std::string title(blocked_popup.second.spec()); |
| - // The popup may not have a valid URL. |
| + // The pop-up may not have a valid URL. |
| if (title.empty()) |
| title = l10n_util::GetStringUTF8(IDS_TAB_LOADING_TITLE); |
| ListItem popup_item(ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
| @@ -685,12 +682,9 @@ void ContentSettingMediaStreamBubbleModel::SetRadioGroup() { |
| RadioGroup radio_group; |
| radio_group.url = url; |
| - base::string16 display_host_utf16; |
| - net::AppendFormattedHost( |
| - url, |
| - profile()->GetPrefs()->GetString(prefs::kAcceptLanguages), |
| - &display_host_utf16); |
| - std::string display_host(base::UTF16ToUTF8(display_host_utf16)); |
| + base::string16 display_host_utf16 = FormatOriginForDisplay( |
| + url, profile()->GetPrefs()->GetString(prefs::kAcceptLanguages)) |
|
msw
2015/05/29 00:18:51
Doesn't this need a bool argument and a semicolon?
palmer
2015/05/29 17:52:12
Done.
|
| + std::string display_host(base::UTF16ToUTF8(display_host_utf16)); |
|
msw
2015/05/29 00:18:51
nit: fix indent.
palmer
2015/05/29 17:52:12
Done.
|
| if (display_host.empty()) |
| display_host = url.spec(); |