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

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

Issue 1495643002: Adds an IOSWebViewTypeParam() method to SearchTermsData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « ios/chrome/browser/search_engines/ui_thread_search_terms_data.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/search_engines/ui_thread_search_terms_data.cc
diff --git a/ios/chrome/browser/search_engines/ui_thread_search_terms_data.cc b/ios/chrome/browser/search_engines/ui_thread_search_terms_data.cc
index e09d36f08c6ba84b5e85fb034ebfe8761c460eba..d6e92f6a68603d09ff80a1a02368433eed69f511 100644
--- a/ios/chrome/browser/search_engines/ui_thread_search_terms_data.cc
+++ b/ios/chrome/browser/search_engines/ui_thread_search_terms_data.cc
@@ -12,10 +12,12 @@
#include "components/search/search.h"
#include "components/version_info/version_info.h"
#include "ios/chrome/browser/application_context.h"
+#include "ios/chrome/browser/experimental_flags.h"
#include "ios/chrome/browser/google/google_brand.h"
#include "ios/chrome/browser/google/google_url_tracker_factory.h"
#include "ios/chrome/common/channel_info.h"
#include "ios/web/public/web_thread.h"
+#include "net/base/escape.h"
#include "url/gurl.h"
#if defined(ENABLE_RLZ)
@@ -119,6 +121,16 @@ std::string UIThreadSearchTermsData::NTPIsThemedParam() const {
return std::string();
}
+std::string UIThreadSearchTermsData::IOSWebViewTypeParam() const {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ std::string param = experimental_flags::GetWKWebViewSearchParams();
+ if (param.empty()) {
+ return std::string();
+ }
+
+ return "&esrch=" + net::EscapeQueryParamValue(param, true);
+}
+
std::string UIThreadSearchTermsData::GoogleImageSearchSource() const {
DCHECK(thread_checker_.CalledOnValidThread());
std::string version(version_info::GetProductName() + " " +
« no previous file with comments | « ios/chrome/browser/search_engines/ui_thread_search_terms_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698