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

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

Issue 2967273002: [Payments] Add an entry for Payment Request to chrome://flags on iOS (Closed)
Patch Set: forgot some files Created 3 years, 5 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/chrome_switches.cc ('k') | ios/chrome/browser/ios_chrome_flag_descriptions.h » ('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 3e55afffe705303bde742af6e5a6d4b7625518ff..9aa1ea7bbf248a3db315d3b0e149a32693847de9 100644
--- a/ios/chrome/browser/experimental_flags.mm
+++ b/ios/chrome/browser/experimental_flags.mm
@@ -19,6 +19,7 @@
#include "base/strings/sys_string_conversions.h"
#include "components/autofill/core/common/autofill_switches.h"
#include "components/password_manager/core/common/password_manager_features.h"
+#include "components/payments/core/features.h"
#include "components/signin/core/common/signin_switches.h"
#include "components/variations/variations_associated_data.h"
#include "ios/chrome/browser/chrome_switches.h"
@@ -173,22 +174,7 @@ bool IsPasswordGenerationEnabled() {
}
bool IsPaymentRequestEnabled() {
noyau (Ping after 24h) 2017/07/06 15:33:28 Can you get rid of this function and use IsEnabled
Mathieu 2017/07/06 15:34:30 Done!
- // This call activates the field trial, if needed, so it must come before any
- // early returns.
- std::string group_name =
- base::FieldTrialList::FindFullName("IOSPaymentRequest");
-
- // Check if the experimental flag is forced on or off.
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kEnablePaymentRequest)) {
- return true;
- } else if (command_line->HasSwitch(switches::kDisablePaymentRequest)) {
- return false;
- }
-
- // Check if the Finch experiment is turned on.
- return base::StartsWith(group_name, "Enabled",
- base::CompareCase::INSENSITIVE_ASCII);
+ return base::FeatureList::IsEnabled(payments::features::kWebPayments);
}
bool IsPhysicalWebEnabled() {
« no previous file with comments | « ios/chrome/browser/chrome_switches.cc ('k') | ios/chrome/browser/ios_chrome_flag_descriptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698