Chromium Code Reviews| Index: components/url_formatter/elide_url.cc |
| diff --git a/components/url_formatter/elide_url.cc b/components/url_formatter/elide_url.cc |
| index 45984304a0fd4dd99557e8db7e5f492044986bce..f3ce046c8319795e277f8d318552112ddbfec48e 100644 |
| --- a/components/url_formatter/elide_url.cc |
| +++ b/components/url_formatter/elide_url.cc |
| @@ -108,10 +108,9 @@ void SplitHost(const GURL& url, |
| #endif // !defined(OS_ANDROID) |
| base::string16 FormatUrlForSecurityDisplayInternal(const GURL& url, |
| - const std::string& languages, |
| bool omit_scheme) { |
| if (!url.is_valid() || url.is_empty() || !url.IsStandard()) |
| - return url_formatter::FormatUrl(url, languages); |
| + return url_formatter::FormatUrl(url); |
| const base::string16 colon(base::ASCIIToUTF16(":")); |
| const base::string16 scheme_separator( |
| @@ -126,12 +125,12 @@ base::string16 FormatUrlForSecurityDisplayInternal(const GURL& url, |
| const GURL* inner_url = url.inner_url(); |
| if (inner_url->SchemeIsFile()) { |
| return base::ASCIIToUTF16(url::kFileSystemScheme) + colon + |
| - FormatUrlForSecurityDisplayInternal(*inner_url, languages, |
| + FormatUrlForSecurityDisplayInternal(*inner_url, |
| false /*omit_scheme*/) + |
|
Peter Kasting
2016/04/05 02:42:33
Nit: While here, I'd remove the /*omit_scheme*/ on
jungshik at Google
2016/04/05 18:56:19
Done.
|
| base::UTF8ToUTF16(url.path()); |
| } |
| return base::ASCIIToUTF16(url::kFileSystemScheme) + colon + |
| - FormatUrlForSecurityDisplayInternal(*inner_url, languages, |
| + FormatUrlForSecurityDisplayInternal(*inner_url, |
| false /*omit_scheme*/); |
| } |
| @@ -165,12 +164,11 @@ namespace url_formatter { |
| // suspect it could be made simpler. |
| base::string16 ElideUrl(const GURL& url, |
| const gfx::FontList& font_list, |
| - float available_pixel_width, |
| - const std::string& languages) { |
| + float available_pixel_width) { |
| // Get a formatted string and corresponding parsing of the url. |
| url::Parsed parsed; |
| const base::string16 url_string = url_formatter::FormatUrl( |
| - url, languages, url_formatter::kFormatUrlOmitAll, |
| + url, url_formatter::kFormatUrlOmitAll, |
| net::UnescapeRule::SPACES, &parsed, nullptr, nullptr); |
| if (available_pixel_width <= 0) |
| return url_string; |
| @@ -358,15 +356,12 @@ base::string16 ElideHost(const GURL& url, |
| #endif // !defined(OS_ANDROID) |
| -base::string16 FormatUrlForSecurityDisplay(const GURL& url, |
| - const std::string& languages) { |
| - return FormatUrlForSecurityDisplayInternal(url, languages, false); |
| +base::string16 FormatUrlForSecurityDisplay(const GURL& url) { |
| + return FormatUrlForSecurityDisplayInternal(url, false); |
| } |
| -base::string16 FormatUrlForSecurityDisplayOmitScheme( |
| - const GURL& url, |
| - const std::string& languages) { |
| - return FormatUrlForSecurityDisplayInternal(url, languages, true); |
| +base::string16 FormatUrlForSecurityDisplayOmitScheme(const GURL& url) { |
| + return FormatUrlForSecurityDisplayInternal(url, true); |
| } |
| } // namespace url_formatter |