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

Unified Diff: components/search/search.cc

Issue 450663002: Move ShouldHideTopVerbatimMatch to components/search (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 months 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') | components/search/search_unittest.cc » ('j') | 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 8689e515b2f1a40a8954ff98f6be319b6b1bcf65..d7e7276fcfade5b90a83c035dd87eea2997a8dbc 100644
--- a/components/search/search.cc
+++ b/components/search/search.cc
@@ -35,6 +35,8 @@ const uint64 kEmbeddedSearchEnabledVersion = 2;
const uint64 kEmbeddedPageVersionDefault = 2;
#endif
+const char kHideVerbatimFlagName[] = "hide_verbatim";
Peter Kasting 2014/08/12 02:03:41 Nit: Define things in the most local scope possibl
hashimoto 2014/08/12 04:43:15 I guess authors of search.cc are putting these con
+
// Constants for the field trial name and group prefix.
// Note in M30 and below this field trial was named "InstantExtended" and in
// M31 was renamed to EmbeddedSearch for clarity and cleanliness. Since we
@@ -143,4 +145,10 @@ bool GetBoolValueForFlagWithDefault(const std::string& flag,
return !!GetUInt64ValueForFlagWithDefault(flag, default_value ? 1 : 0, flags);
}
+bool ShouldHideTopVerbatimMatch() {
+ FieldTrialFlags flags;
+ return GetFieldTrialInfo(&flags) && GetBoolValueForFlagWithDefault(
+ kHideVerbatimFlagName, false, flags);
+}
+
} // namespace chrome
« no previous file with comments | « components/search/search.h ('k') | components/search/search_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698