summaryrefslogtreecommitdiffstats
path: root/chrome/browser/search_engines/search_terms_data.cc
diff options
context:
space:
mode:
authordcblack@chromium.org <dcblack@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-07 08:29:27 +0000
committerdcblack@chromium.org <dcblack@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-07 08:29:27 +0000
commit0a63e61402add55ef764be54378763a62319dd5c (patch)
treed92bd98f3ef6a49c624575d84c825b6fe3484f40 /chrome/browser/search_engines/search_terms_data.cc
parentfee51e2e2cf28119ce61140a5e754ac6ac44beb7 (diff)
downloadchromium_src-0a63e61402add55ef764be54378763a62319dd5c.zip
chromium_src-0a63e61402add55ef764be54378763a62319dd5c.tar.gz
chromium_src-0a63e61402add55ef764be54378763a62319dd5c.tar.bz2
Set up client-side support for having Finch trials enable the Instant Extended API.
Looks for a Finch trial of the name InstantExtended, with groups named Group[0-9]+. Sets the &espv param equal to the group number. If such a Finch trial exists, it is used in place of the value of the about:flags flag and the value of that flag is ignored. Tested successfully with a local Finch server. BUG= Review URL: https://chromiumcodereview.appspot.com/11439024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171727 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/search_engines/search_terms_data.cc')
-rw-r--r--chrome/browser/search_engines/search_terms_data.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/search_engines/search_terms_data.cc b/chrome/browser/search_engines/search_terms_data.cc
index b623fef..1f39547 100644
--- a/chrome/browser/search_engines/search_terms_data.cc
+++ b/chrome/browser/search_engines/search_terms_data.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/metrics/field_trial.h"
+#include "base/string_number_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/google/google_url_tracker.h"
#include "chrome/browser/google/google_util.h"
@@ -112,8 +113,11 @@ string16 UIThreadSearchTermsData::GetRlzParameterValue() const {
std::string UIThreadSearchTermsData::InstantEnabledParam() const {
DCHECK(!BrowserThread::IsWellKnownThread(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (chrome::search::IsInstantExtendedAPIEnabled(profile_))
- return std::string(google_util::kInstantExtendedAPIParam) + "=1&";
+ uint32 instant_extended_api_version =
+ chrome::search::EmbeddedSearchPageVersion(profile_);
+ if (instant_extended_api_version != 0)
+ return std::string(google_util::kInstantExtendedAPIParam) + "=" +
+ base::Uint64ToString(instant_extended_api_version) + "&";
if (chrome::BrowserInstantController::IsInstantEnabled(profile_))
return "ion=1&";
return std::string();