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

Unified Diff: components/search/search.cc

Issue 2526753002: Instant cleanup: Remove abandoned EmbeddedSearch Android-only field trials (Closed)
Patch Set: Created 4 years, 1 month 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 | « components/search/search.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/search/search.cc
diff --git a/components/search/search.cc b/components/search/search.cc
index e7389813510358bc060497d80c558b725793312f..90dc0d9ddc2b36b1bcf937da6a17dc087b8710d4 100644
--- a/components/search/search.cc
+++ b/components/search/search.cc
@@ -27,12 +27,8 @@ namespace {
// space-delimited list of key:value pairs which correspond to these flags:
const char kEmbeddedPageVersionFlagName[] = "espv";
-#if defined(OS_IOS)
+#if defined(OS_IOS) || defined(OS_ANDROID)
const uint64_t kEmbeddedPageVersionDefault = 1;
-#elif defined(OS_ANDROID)
-const uint64_t kEmbeddedPageVersionDefault = 1;
-// Use this variant to enable EmbeddedSearch SearchBox API in the results page.
-const uint64_t kEmbeddedSearchEnabledVersion = 2;
#else
const uint64_t kEmbeddedPageVersionDefault = 2;
#endif
@@ -51,21 +47,11 @@ const char kEmbeddedSearchFieldTrialName[] = "EmbeddedSearch";
// be ignored and Instant Extended will not be enabled by default.
const char kDisablingSuffix[] = "DISABLED";
-#if defined(OS_ANDROID)
-const char kPrefetchSearchResultsFlagName[] = "prefetch_results";
-
-// Controls whether to reuse prerendered Instant Search base page to commit any
-// search query.
-const char kReuseInstantSearchBasePage[] = "reuse_instant_search_base_page";
-#endif
-
} // namespace
bool IsInstantExtendedAPIEnabled() {
-#if defined(OS_IOS)
+#if defined(OS_IOS) || defined(OS_ANDROID)
return false;
-#elif defined(OS_ANDROID)
- return EmbeddedSearchPageVersion() == kEmbeddedSearchEnabledVersion;
#else
return true;
#endif // defined(OS_IOS)
Jered 2016/11/28 23:47:48 nit: please update or remove this comment.
Marc Treib 2016/11/29 14:18:17 Done.
@@ -161,31 +147,11 @@ std::string ForceInstantResultsParam(bool for_prerender) {
}
bool ShouldPrefetchSearchResults() {
- if (!IsInstantExtendedAPIEnabled())
- return false;
-
-#if defined(OS_ANDROID)
- FieldTrialFlags flags;
- return GetFieldTrialInfo(&flags) &&
- GetBoolValueForFlagWithDefault(kPrefetchSearchResultsFlagName, false,
- flags);
-#else
- return true;
-#endif
+ return IsInstantExtendedAPIEnabled();
}
bool ShouldReuseInstantSearchBasePage() {
- if (!ShouldPrefetchSearchResults())
- return false;
-
-#if defined(OS_ANDROID)
- FieldTrialFlags flags;
- return GetFieldTrialInfo(&flags) &&
- GetBoolValueForFlagWithDefault(kReuseInstantSearchBasePage, false,
- flags);
-#else
- return true;
-#endif
+ return ShouldPrefetchSearchResults();
Jered 2016/11/28 23:47:48 nit: It might be simpler to also have this return
Marc Treib 2016/11/29 14:18:17 Done. (It'd probably make sense to merge all these
}
// |url| should either have a secure scheme or have a non-HTTPS base URL that
« no previous file with comments | « components/search/search.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698