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

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

Issue 2779693003: Adding Finch and flag for Sign-in promo (Closed)
Patch Set: Fixing a fix made at the wrong place Created 3 years, 9 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 | « ios/chrome/browser/about_flags.mm ('k') | ios/chrome/browser/resources/Settings.bundle/Experimental.plist » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/experimental_flags.mm
diff --git a/ios/chrome/browser/experimental_flags.mm b/ios/chrome/browser/experimental_flags.mm
index 0e11adbbbca719d7e84455c37b2aed00e5376340..c410716f362712a5ac66fe574f374b504fe240f3 100644
--- a/ios/chrome/browser/experimental_flags.mm
+++ b/ios/chrome/browser/experimental_flags.mm
@@ -17,6 +17,7 @@
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
#include "components/autofill/core/common/autofill_switches.h"
+#include "components/signin/core/common/signin_switches.h"
#include "components/variations/variations_associated_data.h"
#include "ios/chrome/browser/chrome_switches.h"
#include "ios/web/public/web_view_creation_util.h"
@@ -263,4 +264,16 @@ bool IsSuggestionsUIEnabled() {
return false;
}
+bool IsSigninPromoEnabled() {
+ // Check if the experimental flag is forced on or off.
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kEnableSigninPromo))
+ return true;
+ if (command_line->HasSwitch(switches::kDisableSigninPromo))
+ return false;
+ std::string group_name = base::FieldTrialList::FindFullName("IOSSigninPromo");
+ return base::StartsWith(group_name, "Enabled",
+ base::CompareCase::INSENSITIVE_ASCII);
+}
+
} // namespace experimental_flags
« no previous file with comments | « ios/chrome/browser/about_flags.mm ('k') | ios/chrome/browser/resources/Settings.bundle/Experimental.plist » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698