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

Unified Diff: chrome/common/secure_origin_whitelist.cc

Issue 1240183002: Update SplitString calls in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « chrome/common/pepper_flash.cc ('k') | chrome/common/service_process_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/secure_origin_whitelist.cc
diff --git a/chrome/common/secure_origin_whitelist.cc b/chrome/common/secure_origin_whitelist.cc
index d8294a400362b17485babde65724d5ac36b7a2f0..3715b3b488d1a622f4df6e5b9b3ca58631bf9b63 100644
--- a/chrome/common/secure_origin_whitelist.cc
+++ b/chrome/common/secure_origin_whitelist.cc
@@ -18,10 +18,10 @@ void GetSecureOriginWhitelist(std::set<GURL>* origins) {
*base::CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kUnsafelyTreatInsecureOriginAsSecure) &&
command_line.HasSwitch(switches::kUserDataDir)) {
- std::vector<std::string> given_origins;
- base::SplitString(command_line.GetSwitchValueASCII(
- switches::kUnsafelyTreatInsecureOriginAsSecure), ',', &given_origins);
- for (const auto& origin : given_origins)
+ std::string origins_str = command_line.GetSwitchValueASCII(
+ switches::kUnsafelyTreatInsecureOriginAsSecure);
+ for (const std::string& origin : base::SplitString(
+ origins_str, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL))
origins->insert(GURL(origin));
}
}
« no previous file with comments | « chrome/common/pepper_flash.cc ('k') | chrome/common/service_process_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698