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

Unified Diff: components/autofill/content/browser/risk/fingerprint.cc

Issue 1234973004: Update SplitString calls in components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes 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 | « no previous file | components/autofill/content/browser/wallet/wallet_address.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/browser/risk/fingerprint.cc
diff --git a/components/autofill/content/browser/risk/fingerprint.cc b/components/autofill/content/browser/risk/fingerprint.cc
index b4ea95211f2374595260eaeeeb336871665dff24..dfee9b5e76443ed621c07548b3ec56927d39b8d7 100644
--- a/components/autofill/content/browser/risk/fingerprint.cc
+++ b/components/autofill/content/browser/risk/fingerprint.cc
@@ -113,12 +113,10 @@ void AddPluginsToFingerprint(const std::vector<content::WebPluginInfo>& plugins,
void AddAcceptLanguagesToFingerprint(
const std::string& accept_languages_str,
Fingerprint::MachineCharacteristics* machine) {
- std::vector<std::string> accept_languages;
- base::SplitString(accept_languages_str, ',', &accept_languages);
- for (std::vector<std::string>::const_iterator it = accept_languages.begin();
- it != accept_languages.end(); ++it) {
- machine->add_requested_language(*it);
- }
+ for (const std::string& lang :
+ base::SplitString(accept_languages_str, ",", base::TRIM_WHITESPACE,
+ base::SPLIT_WANT_ALL))
+ machine->add_requested_language(lang);
}
// This function writes
« no previous file with comments | « no previous file | components/autofill/content/browser/wallet/wallet_address.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698