commit | b3aa36a855f37cb190c2a3ad75d85bd0ead199a3 | [log] [tgz] |
---|---|---|
author | Mustafa Emre Acer <[email protected]> | Tue May 22 21:44:05 2018 |
committer | Commit Bot <[email protected]> | Tue May 22 21:44:05 2018 |
tree | d1eead004759fdcbc801fc950564ed76abd122b2 | |
parent | d6d6b5863708b03db3c8eb3112b93e6f23ecf819 [diff] [blame] |
Add support to chrome://flags for command line flags that need to be treated as a list of origins This CL adds support for command line flags that are lists of url::Origins. E.g. The value in --flag=value will now be modifyable from the chrome://flags page using a free form textbox, and will be treated as a comma separated list of origins (e.g. http://example1.test,http://example2.test) The string from the textbox is transformed as follows: - Continuous whitespace characters are collapsed into single a space - String is tokenized using space and comma as delimiters - Each token is parsed as a GURL. Invalid URLs or URLs with a scheme other than http and https are discarded. - Remaining URLs are converted to url::Origins, then joined into a single, comma separated string. The CL also adds --unsafely-treat-insecure-origin-as-secure as the first such flag to chrome://flags. Developers will now be able to modify the list of insecure origins treated as secure from the chrome://flags page on all platforms. Bug: 834381 Change-Id: Iad44b5b2724687c7bea1ae45c23ccc910eb5cc9f Reviewed-on: https://chromium-review.googlesource.com/1038152 Reviewed-by: Lei Zhang <[email protected]> Reviewed-by: Mattias Nissler <[email protected]> Reviewed-by: Mike West <[email protected]> Reviewed-by: Edward Jung <[email protected]> Reviewed-by: Alexei Svitkine <[email protected]> Commit-Queue: Mustafa Emre Acer <[email protected]> Cr-Commit-Position: refs/heads/master@{#560791}
diff --git a/components/flags_ui/flags_ui_constants.cc b/components/flags_ui/flags_ui_constants.cc index 2b902245b..a3e2b1c 100644 --- a/components/flags_ui/flags_ui_constants.cc +++ b/components/flags_ui/flags_ui_constants.cc
@@ -12,6 +12,7 @@ // Message handlers. const char kEnableExperimentalFeature[] = "enableExperimentalFeature"; const char kRequestExperimentalFeatures[] = "requestExperimentalFeatures"; +const char kSetOriginListFlag[] = "setOriginListFlag"; const char kResetAllFlags[] = "resetAllFlags"; const char kRestartBrowser[] = "restartBrowser";