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 |