diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-01 04:12:44 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-01 04:12:44 +0000 |
commit | 014010e750ac79058bd94b03caf9a6f7a5166e99 (patch) | |
tree | 532ea99ac3bf6ad6803520af437845a482bfe885 | |
parent | 9fc48194f8f9d07a487cbefa4018cc408bd0e38b (diff) | |
download | chromium_src-014010e750ac79058bd94b03caf9a6f7a5166e99.zip chromium_src-014010e750ac79058bd94b03caf9a6f7a5166e99.tar.gz chromium_src-014010e750ac79058bd94b03caf9a6f7a5166e99.tar.bz2 |
Remove google search experiment
I'll leave the infrastructure in place to make it easier to
land another such experiment (where the query string is modified).
There has already been discussion of other experiments, so it
seems worth leaving it.
r=pkasting
BUG=97345
Review URL: http://codereview.chromium.org/7981018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103623 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/chrome_browser_main.cc | 15 | ||||
-rw-r--r-- | chrome/browser/chrome_browser_main.h | 3 | ||||
-rw-r--r-- | chrome/browser/search_engines/search_terms_data.cc | 16 | ||||
-rw-r--r-- | chrome/browser/search_engines/template_url.cc | 13 | ||||
-rw-r--r-- | chrome/browser/search_engines/template_url_unittest.cc | 13 |
5 files changed, 10 insertions, 50 deletions
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index 6385859..45bc339 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc @@ -1067,20 +1067,6 @@ void ChromeBrowserMainParts::PredictorFieldTrial() { } } -// Test the impact on subsequent Google searches of getting suggestions from -// www.google.TLD instead of clients1.google.TLD. -void ChromeBrowserMainParts::SuggestPrefixFieldTrial() { - const base::FieldTrial::Probability kSuggestPrefixDivisor = 100; - // 50% probability. - const base::FieldTrial::Probability kSuggestPrefixProbability = 50; - // After Jan 1, 2012, it will always be in default group. - scoped_refptr<base::FieldTrial> trial( - new base::FieldTrial("SuggestHostPrefix", - kSuggestPrefixDivisor, "Default_Prefix", 2012, 1, 1)); - trial->AppendGroup("Www_Prefix", kSuggestPrefixProbability); - // The field trial is detected directly, so we don't need to call anything. -} - void ChromeBrowserMainParts::DefaultAppsFieldTrial() { #if defined(OS_WIN) string16 brand; @@ -1156,7 +1142,6 @@ void ChromeBrowserMainParts::SetupFieldTrials(bool metrics_recording_enabled, InstantFieldTrial::Activate(); SpdyFieldTrial(); ConnectBackupJobsFieldTrial(); - SuggestPrefixFieldTrial(); WarmConnectionFieldTrial(); PredictorFieldTrial(); DefaultAppsFieldTrial(); diff --git a/chrome/browser/chrome_browser_main.h b/chrome/browser/chrome_browser_main.h index b6d9817..d3e8fda 100644 --- a/chrome/browser/chrome_browser_main.h +++ b/chrome/browser/chrome_browser_main.h @@ -72,9 +72,6 @@ class ChromeBrowserMainParts : public content::BrowserMainParts { // specified timeout value is reached. void ConnectBackupJobsFieldTrial(); - // A/B test for using a different host prefix in Google search suggest. - void SuggestPrefixFieldTrial(); - // Field trial to see what disabling DNS pre-resolution does to // latency of page loads. void PredictorFieldTrial(); diff --git a/chrome/browser/search_engines/search_terms_data.cc b/chrome/browser/search_engines/search_terms_data.cc index 3b98b72..be64c9b 100644 --- a/chrome/browser/search_engines/search_terms_data.cc +++ b/chrome/browser/search_engines/search_terms_data.cc @@ -24,27 +24,11 @@ SearchTermsData::~SearchTermsData() { } std::string SearchTermsData::GoogleBaseSuggestURLValue() const { - // The suggest base URL we want at the end is something like - // "http://clients1.google.TLD/complete/". The key bit we want from the - // original Google base URL is the TLD. - - // This is being temporarilly modified to (experimentally) use - // "http://www.google.TLD/complete/". - static bool www = base::FieldTrialList::TrialExists("SuggestHostPrefix") && - base::FieldTrialList::FindFullName("SuggestHostPrefix") == "Www_Prefix"; - const char* prefix = www ? "www." : "clients1."; - // Start with the Google base URL. const GURL base_url(GoogleBaseURLValue()); DCHECK(base_url.is_valid()); - // Change "www." to "clients1." in the hostname. If no "www." was found, just - // prepend "clients1.". - const std::string base_host(base_url.host()); GURL::Replacements repl; - const std::string suggest_host(prefix + - (base_host.compare(0, 4, "www.") ? base_host : base_host.substr(4))); - repl.SetHostStr(suggest_host); // Replace any existing path with "/complete/". static const std::string suggest_path("/complete/"); diff --git a/chrome/browser/search_engines/template_url.cc b/chrome/browser/search_engines/template_url.cc index e8619d7..ced4654 100644 --- a/chrome/browser/search_engines/template_url.cc +++ b/chrome/browser/search_engines/template_url.cc @@ -420,16 +420,11 @@ std::string TemplateURLRef::ReplaceSearchTermsUsingTermsData( break; } - case GOOGLE_SEARCH_FIELDTRIAL_GROUP: { - static bool use_suggest_prefix = - base::FieldTrialList::TrialExists("SuggestHostPrefix"); - if (use_suggest_prefix) { - static bool used_www = (base::FieldTrialList::FindFullName( - "SuggestHostPrefix") == "Www_Prefix"); - url.insert(i->index, used_www ? "gcx=w&" : "gcx=c&"); - } + case GOOGLE_SEARCH_FIELDTRIAL_GROUP: + // We are not curerntly running any fieldtrials that modulate the search + // url. If we do, then we'd have some conditional insert such as: + // url.insert(i->index, used_www ? "gcx=w&" : "gcx=c&"); break; - } case GOOGLE_UNESCAPED_SEARCH_TERMS: { std::string unescaped_terms; diff --git a/chrome/browser/search_engines/template_url_unittest.cc b/chrome/browser/search_engines/template_url_unittest.cc index eabe078..f834129 100644 --- a/chrome/browser/search_engines/template_url_unittest.cc +++ b/chrome/browser/search_engines/template_url_unittest.cc @@ -209,7 +209,7 @@ TEST_F(TemplateURLTest, URLRefTestSearchTermsUsingTermsData) { { "{google:baseURL}{language}{searchTerms}", string16(), "http://example.com/e/yy" }, { "{google:baseSuggestURL}{searchTerms}", string16(), - "http://clients1.example.com/complete/" } + "http://example.com/complete/" } }; TestSearchTermsData search_terms_data("http://example.com/e/"); @@ -473,12 +473,11 @@ TEST_F(TemplateURLTest, GoogleBaseSuggestURL) { const char* const base_url; const char* const base_suggest_url; } data[] = { - { "http://google.com/", "http://clients1.google.com/complete/", }, - { "http://www.google.com/", "http://clients1.google.com/complete/", }, - { "http://www.google.co.uk/", "http://clients1.google.co.uk/complete/", }, - { "http://www.google.com.by/", - "http://clients1.google.com.by/complete/", }, - { "http://google.com/intl/xx/", "http://clients1.google.com/complete/", }, + { "http://google.com/", "http://google.com/complete/", }, + { "http://www.google.com/", "http://www.google.com/complete/", }, + { "http://www.google.co.uk/", "http://www.google.co.uk/complete/", }, + { "http://www.google.com.by/", "http://www.google.com.by/complete/", }, + { "http://google.com/intl/xx/", "http://google.com/complete/", }, }; for (size_t i = 0; i < ARRAYSIZE_UNSAFE(data); ++i) |