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

Unified Diff: chrome/browser/dom_distiller/tab_utils_android.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 | « chrome/browser/custom_home_pages_table_model.cc ('k') | chrome/browser/download/download_query.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_distiller/tab_utils_android.cc
diff --git a/chrome/browser/dom_distiller/tab_utils_android.cc b/chrome/browser/dom_distiller/tab_utils_android.cc
index 8133eb00eec7ec8e39e230a798a855ffcc979d5b..c3b943a263c8b66db188dd033a3d1a3b09dde6ca 100644
--- a/chrome/browser/dom_distiller/tab_utils_android.cc
+++ b/chrome/browser/dom_distiller/tab_utils_android.cc
@@ -10,9 +10,7 @@
#include "chrome/browser/dom_distiller/tab_utils.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
-#include "chrome/common/pref_names.h"
#include "components/dom_distiller/core/experiments.h"
-#include "components/prefs/pref_service.h"
#include "components/url_formatter/url_formatter.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_constants.h"
@@ -45,11 +43,6 @@ ScopedJavaLocalRef<jstring> GetFormattedUrlFromOriginalDistillerUrl(
const JavaParamRef<jclass>& clazz,
const JavaParamRef<jstring>& j_url) {
GURL url(base::android::ConvertJavaStringToUTF8(env, j_url));
- Profile* profile = ProfileManager::GetLastUsedProfile();
- std::string languages; // Empty if Profile cannot be retrieved.
- if (profile) {
- languages = profile->GetPrefs()->GetString(prefs::kAcceptLanguages);
- }
if (url.spec().length() > content::kMaxURLDisplayChars)
url = url.IsStandard() ? url.GetOrigin() : GURL(url.scheme() + ":");
@@ -59,7 +52,7 @@ ScopedJavaLocalRef<jstring> GetFormattedUrlFromOriginalDistillerUrl(
// the space.
return base::android::ConvertUTF16ToJavaString(
env, url_formatter::FormatUrl(
- url, languages, url_formatter::kFormatUrlOmitAll,
+ url, url_formatter::kFormatUrlOmitAll,
net::UnescapeRule::NORMAL, nullptr, nullptr, nullptr));
}
« no previous file with comments | « chrome/browser/custom_home_pages_table_model.cc ('k') | chrome/browser/download/download_query.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698