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

Unified Diff: components/url_formatter/elide_url.cc

Issue 1841653003: Drop |languages| from {Format,Elide}Url* and IDNToUnicode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo in elide_url.cc Created 4 years, 8 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 | « components/url_formatter/elide_url.h ('k') | components/url_formatter/elide_url_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « components/url_formatter/elide_url.h ('k') | components/url_formatter/elide_url_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698