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

Unified Diff: chrome/browser/search/search.cc

Issue 348433009: [AiS] Command-line flag and field trial changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
Index: chrome/browser/search/search.cc
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
index 43a52da7b590d5914f12725ff561f80354b9216d..59bb8c103bb7f5fdd02453c4e4c641ef0e1fc4c4 100644
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
@@ -13,6 +13,7 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/google/google_util.h"
+#include "chrome/browser/omnibox/omnibox_field_trial.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/search/instant_service.h"
@@ -618,6 +619,16 @@ bool ShouldHideTopVerbatimMatch() {
kHideVerbatimFlagName, false, flags);
}
+bool IsAnswersInSuggestEnabled() {
Mark P 2014/06/19 23:50:21 This code should not go here. search.cc is basic
Justin Donnelly 2014/06/20 00:39:20 Done.
+ const CommandLine* cl = CommandLine::ForCurrentProcess();
+ if (cl->HasSwitch(switches::kDisableAnswersInSuggest))
+ return false;
+ if (cl->HasSwitch(switches::kEnableAnswersInSuggest))
+ return true;
+
+ return OmniboxFieldTrial::EnableAnswersInSuggest();
+}
+
DisplaySearchButtonConditions GetDisplaySearchButtonConditions() {
const CommandLine* cl = CommandLine::ForCurrentProcess();
if (cl->HasSwitch(switches::kDisableSearchButtonInOmnibox))

Powered by Google App Engine
This is Rietveld 408576698