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

Unified Diff: google_apis/gaia/fake_gaia.cc

Issue 1278973003: Revert of Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « google_apis/drive/test_util.cc ('k') | google_apis/gaia/gaia_auth_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/fake_gaia.cc
diff --git a/google_apis/gaia/fake_gaia.cc b/google_apis/gaia/fake_gaia.cc
index d24158c40ae4984e3ed2bfb7d50a06bc875f91fd..6749393faa85d08bf7d20421cc1446c1dd285f8a 100644
--- a/google_apis/gaia/fake_gaia.cc
+++ b/google_apis/gaia/fake_gaia.cc
@@ -71,13 +71,17 @@
// Parses cookie name-value map our of |request|.
CookieMap GetRequestCookies(const HttpRequest& request) {
CookieMap result;
- auto iter = request.headers.find("Cookie");
+ std::map<std::string, std::string>::const_iterator iter =
+ request.headers.find("Cookie");
if (iter != request.headers.end()) {
- for (const std::string& cookie_line :
- base::SplitString(iter->second, " ", base::TRIM_WHITESPACE,
- base::SPLIT_WANT_ALL)) {
- std::vector<std::string> name_value = base::SplitString(
- cookie_line, "=", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+ std::vector<std::string> cookie_nv_pairs;
+ base::SplitString(iter->second, ' ', &cookie_nv_pairs);
+ for(std::vector<std::string>::const_iterator cookie_line =
+ cookie_nv_pairs.begin();
+ cookie_line != cookie_nv_pairs.end();
+ ++cookie_line) {
+ std::vector<std::string> name_value;
+ base::SplitString(*cookie_line, '=', &name_value);
if (name_value.size() != 2)
continue;
@@ -437,8 +441,8 @@
if (auth_token.empty() || client_id.empty())
return NULL;
- std::vector<std::string> scope_list = base::SplitString(
- scope_string, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+ std::vector<std::string> scope_list;
+ base::SplitString(scope_string, ' ', &scope_list);
ScopeSet scopes(scope_list.begin(), scope_list.end());
for (AccessTokenInfoMap::const_iterator entry(
« no previous file with comments | « google_apis/drive/test_util.cc ('k') | google_apis/gaia/gaia_auth_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698