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

Unified Diff: chrome/browser/search_engines/ui_thread_search_terms_data.cc

Issue 1238683003: Unpunycode search keywords and short names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Restrict IDN-decoding to keywords generated from URL; Use prefs::kAcceptLanguages for IDN-decoding Created 5 years, 5 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/search_engines/ui_thread_search_terms_data.cc
diff --git a/chrome/browser/search_engines/ui_thread_search_terms_data.cc b/chrome/browser/search_engines/ui_thread_search_terms_data.cc
index 62421ad47ab9e5c79349fca101bc84ec933744e5..b8a58f8110456e5b4c040a2cb214b416f2b18c39 100644
--- a/chrome/browser/search_engines/ui_thread_search_terms_data.cc
+++ b/chrome/browser/search_engines/ui_thread_search_terms_data.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
+#include "chrome/common/pref_names.h"
#include "components/google/core/browser/google_url_tracker.h"
#include "components/google/core/browser/google_util.h"
#include "components/omnibox/browser/omnibox_field_trial.h"
@@ -181,6 +182,12 @@ std::string UIThreadSearchTermsData::GoogleImageSearchSource() const {
return version;
}
+std::string UIThreadSearchTermsData::GetAcceptedLanguages() const {
+ if (!profile_)
+ return std::string();
+ return profile_->GetPrefs()->GetString(prefs::kAcceptLanguages);
Peter Kasting 2015/07/20 19:30:51 Nit: Shorter: return profile_ ? profile_-
alshabalin 2015/07/21 08:44:19 Done.
+}
+
// static
void UIThreadSearchTermsData::SetGoogleBaseURL(const std::string& base_url) {
delete google_base_url_;

Powered by Google App Engine
This is Rietveld 408576698