| 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..bcc8840c83224827b048b0638632b6e214b47d08 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,13 +125,11 @@ 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,
|
| - false /*omit_scheme*/) +
|
| + FormatUrlForSecurityDisplayInternal(*inner_url, false) +
|
| base::UTF8ToUTF16(url.path());
|
| }
|
| return base::ASCIIToUTF16(url::kFileSystemScheme) + colon +
|
| - FormatUrlForSecurityDisplayInternal(*inner_url, languages,
|
| - false /*omit_scheme*/);
|
| + FormatUrlForSecurityDisplayInternal(*inner_url, false);
|
| }
|
|
|
| const GURL origin = url.GetOrigin();
|
| @@ -165,12 +162,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 +354,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
|
|
|