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

Unified Diff: chrome/browser/download/download_query.cc

Issue 13409003: Hide ContentClient getters from embedders so that they they don't reuse content's embedder API. The… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 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
===================================================================
--- chrome/browser/download/download_query.cc (revision 192622)
+++ chrome/browser/download/download_query.cc (working copy)
@@ -15,6 +15,7 @@
#include "base/i18n/string_search.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
+#include "base/prefs/pref_service.h"
#include "base/stl_util.h"
#include "base/string16.h"
#include "base/stringprintf.h"
@@ -22,6 +23,8 @@
#include "base/time.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/common/pref_names.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/download_item.h"
#include "googleurl/src/gurl.h"
@@ -65,10 +68,10 @@
string16 url_formatted = url_raw;
if (item.GetBrowserContext()) {
+ Profile* profile = Profile::FromBrowserContext(item.GetBrowserContext());
url_formatted = net::FormatUrl(
item.GetOriginalUrl(),
- content::GetContentClient()->browser()->GetAcceptLangs(
- item.GetBrowserContext()));
+ profile->GetPrefs()->GetString(prefs::kAcceptLanguages));
}
if (base::i18n::StringSearchIgnoringCaseAndAccents(
query, url_formatted, NULL, NULL)) {

Powered by Google App Engine
This is Rietveld 408576698