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

Unified Diff: ios/chrome/browser/experimental_flags.mm

Issue 2643753002: Add the suggestions UI in chrome (Closed)
Patch Set: Convert to ARC Created 3 years, 11 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: ios/chrome/browser/experimental_flags.mm
diff --git a/ios/chrome/browser/experimental_flags.mm b/ios/chrome/browser/experimental_flags.mm
index d4d26e79b45f1c77b767dc37432cee10890fea8a..d2db2b1f7ef097a439e984ade44f951a49242741 100644
--- a/ios/chrome/browser/experimental_flags.mm
+++ b/ios/chrome/browser/experimental_flags.mm
@@ -309,4 +309,17 @@ bool UseOnlyLocalHeuristicsForPasswordGeneration() {
autofill::switches::kLocalHeuristicsOnlyForPasswordGeneration);
}
+bool IsSuggestionsUIEnabled() {
+ // Check if the experimental flag is forced on or off.
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kEnableSuggestionsUI)) {
marq (ping after 24h) 2017/01/19 16:32:31 Is the usual pattern when both 'enable' and 'disab
gambard 2017/01/19 17:50:12 It is the one used in the other flags.
marq (ping after 24h) 2017/01/20 12:34:46 OK.
+ return true;
+ } else if (command_line->HasSwitch(switches::kDisableSuggestionsUI)) {
marq (ping after 24h) 2017/01/19 16:32:31 no 'else' after return; just if () return if (
gambard 2017/01/19 17:50:11 Done.
+ return false;
+ }
+
+ // By default, disable it.
+ return false;
+}
+
} // namespace experimental_flags

Powered by Google App Engine
This is Rietveld 408576698