Commit 6f053f85 authored by kmadhusu@chromium.org's avatar kmadhusu@chromium.org

Remove |kAltInstantURLPath| from search.cc and retain the default Instant...

Remove |kAltInstantURLPath| from search.cc and retain the default Instant search base url path when the |kUseAltInstantURL| flag is enabled. 

BUG=382694
TEST=Run chrome with the following field trial flag and observe the Instant search base page url.
     --force-fieldtrials="EmbeddedSearch/Group1 use_alternate_instant_url:1 /"

Review URL: https://codereview.chromium.org/453573002

Cr-Commit-Position: refs/heads/master@{#289046}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289046 0039d316-1c4b-4281-b951-d872f2087c98
parent d0cd6748
...@@ -61,7 +61,6 @@ const char kReuseInstantSearchBasePage[] = "reuse_instant_search_base_page"; ...@@ -61,7 +61,6 @@ const char kReuseInstantSearchBasePage[] = "reuse_instant_search_base_page";
// Controls whether to use the alternate Instant search base URL. This allows // Controls whether to use the alternate Instant search base URL. This allows
// experimentation of Instant search. // experimentation of Instant search.
const char kUseAltInstantURL[] = "use_alternate_instant_url"; const char kUseAltInstantURL[] = "use_alternate_instant_url";
const char kAltInstantURLPath[] = "search";
const char kAltInstantURLQueryParams[] = "&qbp=1"; const char kAltInstantURLQueryParams[] = "&qbp=1";
const char kDisplaySearchButtonFlagName[] = "display_search_button"; const char kDisplaySearchButtonFlagName[] = "display_search_button";
...@@ -494,8 +493,6 @@ GURL GetInstantURL(Profile* profile, bool force_instant_results) { ...@@ -494,8 +493,6 @@ GURL GetInstantURL(Profile* profile, bool force_instant_results) {
if (ShouldUseAltInstantURL()) { if (ShouldUseAltInstantURL()) {
GURL::Replacements replacements; GURL::Replacements replacements;
const std::string path(kAltInstantURLPath);
replacements.SetPathStr(path);
const std::string query( const std::string query(
instant_url.query() + std::string(kAltInstantURLQueryParams)); instant_url.query() + std::string(kAltInstantURLQueryParams));
replacements.SetQueryStr(query); replacements.SetQueryStr(query);
......
...@@ -474,7 +474,7 @@ TEST_F(SearchTest, GetInstantURL) { ...@@ -474,7 +474,7 @@ TEST_F(SearchTest, GetInstantURL) {
profile()->GetPrefs()->SetBoolean(prefs::kSearchSuggestEnabled, true); profile()->GetPrefs()->SetBoolean(prefs::kSearchSuggestEnabled, true);
ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial( ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
"EmbeddedSearch", "Group1 espv:8 use_alternate_instant_url:1")); "EmbeddedSearch", "Group1 espv:8 use_alternate_instant_url:1"));
EXPECT_EQ(GURL("https://foo.com/search?foo=foo&qbp=1#foo=foo&strk"), EXPECT_EQ(GURL("https://foo.com/instant?foo=foo&qbp=1#foo=foo&strk"),
GetInstantURL(profile(), false)); GetInstantURL(profile(), false));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment