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

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

Issue 2938273002: Add new mark-non-secure-as options to chrome://flags on iOS (Closed)
Patch Set: Add using flags_ui::FeatureEntry Created 3 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
« no previous file with comments | « ios/chrome/browser/BUILD.gn ('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/about_flags.mm
diff --git a/ios/chrome/browser/about_flags.mm b/ios/chrome/browser/about_flags.mm
index 7df5c90fc5df0bfff3e667a7c64bc565f86457bf..0c4cad385e3421d5131c5471f7bd02784b3ec199 100644
--- a/ios/chrome/browser/about_flags.mm
+++ b/ios/chrome/browser/about_flags.mm
@@ -26,6 +26,7 @@
#include "components/flags_ui/flags_storage.h"
#include "components/flags_ui/flags_ui_switches.h"
#include "components/ntp_tiles/switches.h"
+#include "components/security_state/core/switches.h"
#include "components/signin/core/common/signin_switches.h"
#include "components/strings/grit/components_strings.h"
#include "ios/chrome/browser/chrome_switches.h"
@@ -43,7 +44,24 @@
#error "This file requires ARC support."
#endif
+using flags_ui::FeatureEntry;
+
namespace {
+const FeatureEntry::Choice kMarkHttpAsChoices[] = {
+ {flags_ui::kGenericExperimentChoiceDefault, "", ""},
+ {flag_descriptions::kMarkHttpAsNonSecureAfterEditing,
+ security_state::switches::kMarkHttpAs,
+ security_state::switches::kMarkHttpAsNonSecureAfterEditing},
+ {flag_descriptions::kMarkHttpAsNonSecureWhileIncognito,
+ security_state::switches::kMarkHttpAs,
+ security_state::switches::kMarkHttpAsNonSecureWhileIncognito},
+ {flag_descriptions::kMarkHttpAsNonSecureWhileIncognitoOrEditing,
+ security_state::switches::kMarkHttpAs,
+ security_state::switches::kMarkHttpAsNonSecureWhileIncognitoOrEditing},
+ {flag_descriptions::kMarkHttpAsDangerous,
+ security_state::switches::kMarkHttpAs,
+ security_state::switches::kMarkHttpAsDangerous}};
+
// To add a new entry, add to the end of kFeatureEntries. There are two
// distinct types of entries:
// . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE
@@ -68,6 +86,9 @@ const flags_ui::FeatureEntry kFeatureEntries[] = {
flag_descriptions::kBrowserTaskSchedulerDescription, flags_ui::kOsIos,
ENABLE_DISABLE_VALUE_TYPE(switches::kEnableBrowserTaskScheduler,
switches::kDisableBrowserTaskScheduler)},
+ {"mark-non-secure-as", flag_descriptions::kMarkHttpAsName,
+ flag_descriptions::kMarkHttpAsDescription, flags_ui::kOsIos,
+ MULTI_VALUE_TYPE(kMarkHttpAsChoices)},
};
// Add all switches from experimental flags to |command_line|.
« no previous file with comments | « ios/chrome/browser/BUILD.gn ('k') | ios/chrome/browser/ios_chrome_flag_descriptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698