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

Unified Diff: chrome/installer/util/user_experiment.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/installer/util/compat_checks.cc ('k') | chrome/renderer/media/chrome_key_systems.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/user_experiment.cc
diff --git a/chrome/installer/util/user_experiment.cc b/chrome/installer/util/user_experiment.cc
index 4a63eef382250a8d7deff977ead773ea950f2084..af0bb6842719b5e544c24483477864d13dccb214 100644
--- a/chrome/installer/util/user_experiment.cc
+++ b/chrome/installer/util/user_experiment.cc
@@ -355,13 +355,10 @@ bool CreateExperimentDetails(int flavor, ExperimentDetails* experiment) {
if (experiment_locale != locale && experiment_locale != L"*")
continue;
- std::vector<base::string16> brand_codes;
- base::SplitString(kExperiments[i].brands, L',', &brand_codes);
- if (brand_codes.empty())
- return false;
- for (std::vector<base::string16>::iterator it = brand_codes.begin();
- it != brand_codes.end(); ++it) {
- if (*it != brand && *it != L"*")
+ for (const base::string16& cur : base::SplitString(
+ kExperiments[i].brands, L",",
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
+ if (cur != brand && cur != L"*")
continue;
// We have found our match.
const UserExperimentSpecs& match = kExperiments[i];
« no previous file with comments | « chrome/installer/util/compat_checks.cc ('k') | chrome/renderer/media/chrome_key_systems.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698