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

Unified Diff: chrome/browser/download/download_query.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
Index: chrome/browser/download/download_query.cc
diff --git a/chrome/browser/download/download_query.cc b/chrome/browser/download/download_query.cc
index f562ad8b8ff647591a83eafdad420e80cd5dd352..941d4006a9446919493f7a133cfe78c76088e14e 100644
--- a/chrome/browser/download/download_query.cc
+++ b/chrome/browser/download/download_query.cc
@@ -25,9 +25,6 @@
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "base/values.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/common/pref_names.h"
-#include "components/prefs/pref_service.h"
#include "components/url_formatter/url_formatter.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/download_item.h"
@@ -219,12 +216,8 @@ bool DownloadQuery::MatchesQuery(const std::vector<base::string16>& query_terms,
base::string16 url_raw(base::UTF8ToUTF16(item.GetOriginalUrl().spec()));
base::string16 url_formatted = url_raw;
- if (item.GetBrowserContext()) {
- Profile* profile = Profile::FromBrowserContext(item.GetBrowserContext());
- url_formatted = url_formatter::FormatUrl(
- item.GetOriginalUrl(),
- profile->GetPrefs()->GetString(prefs::kAcceptLanguages));
- }
+ if (item.GetBrowserContext())
+ url_formatted = url_formatter::FormatUrl(item.GetOriginalUrl());
base::string16 path(item.GetTargetFilePath().LossyDisplayName());
for (std::vector<base::string16>::const_iterator it = query_terms.begin();
« no previous file with comments | « chrome/browser/dom_distiller/tab_utils_android.cc ('k') | chrome/browser/download/notification/download_item_notification.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698