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

Unified Diff: components/content_settings/core/browser/content_settings_utils.cc

Issue 1234973004: Update SplitString calls in components (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
Index: components/content_settings/core/browser/content_settings_utils.cc
diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc
index eb91f0b6de1eb337ea639dc4e4429cd55ab00248..51abfcb5a9bd629effafb9fb1ad40a9098348345 100644
--- a/components/content_settings/core/browser/content_settings_utils.cc
+++ b/components/content_settings/core/browser/content_settings_utils.cc
@@ -112,8 +112,9 @@ std::string CreatePatternString(
}
PatternPair ParsePatternString(const std::string& pattern_str) {
- std::vector<std::string> pattern_str_list;
- base::SplitString(pattern_str, kPatternSeparator[0], &pattern_str_list);
+ std::vector<std::string> pattern_str_list = base::SplitString(
+ pattern_str, std::string(1, kPatternSeparator[0]),
+ base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL);
yzshen1 2015/07/22 22:50:34 TRIM_WHITESPACE
// If the |pattern_str| is an empty string then the |pattern_string_list|
// contains a single empty string. In this case the empty string will be

Powered by Google App Engine
This is Rietveld 408576698