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

Side by Side Diff: google_apis/gaia/gaia_oauth_client.cc

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "google_apis/gaia/gaia_oauth_client.h" 5 #include "google_apis/gaia/gaia_oauth_client.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 request_type_ = REFRESH_TOKEN; 130 request_type_ = REFRESH_TOKEN;
131 std::string post_body = 131 std::string post_body =
132 "refresh_token=" + net::EscapeUrlEncodedData(refresh_token, true) + 132 "refresh_token=" + net::EscapeUrlEncodedData(refresh_token, true) +
133 "&client_id=" + net::EscapeUrlEncodedData(oauth_client_info.client_id, 133 "&client_id=" + net::EscapeUrlEncodedData(oauth_client_info.client_id,
134 true) + 134 true) +
135 "&client_secret=" + 135 "&client_secret=" +
136 net::EscapeUrlEncodedData(oauth_client_info.client_secret, true) + 136 net::EscapeUrlEncodedData(oauth_client_info.client_secret, true) +
137 "&grant_type=refresh_token"; 137 "&grant_type=refresh_token";
138 138
139 if (!scopes.empty()) { 139 if (!scopes.empty()) {
140 std::string scopes_string = JoinString(scopes, ' '); 140 std::string scopes_string = base::JoinString(scopes, " ");
141 post_body += "&scope=" + net::EscapeUrlEncodedData(scopes_string, true); 141 post_body += "&scope=" + net::EscapeUrlEncodedData(scopes_string, true);
142 } 142 }
143 143
144 MakeGaiaRequest(GURL(GaiaUrls::GetInstance()->oauth2_token_url()), 144 MakeGaiaRequest(GURL(GaiaUrls::GetInstance()->oauth2_token_url()),
145 post_body, max_retries, delegate); 145 post_body, max_retries, delegate);
146 } 146 }
147 147
148 void GaiaOAuthClient::Core::GetUserEmail(const std::string& oauth_access_token, 148 void GaiaOAuthClient::Core::GetUserEmail(const std::string& oauth_access_token,
149 int max_retries, 149 int max_retries,
150 Delegate* delegate) { 150 Delegate* delegate) {
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 } 403 }
404 404
405 void GaiaOAuthClient::GetTokenHandleInfo(const std::string& token_handle, 405 void GaiaOAuthClient::GetTokenHandleInfo(const std::string& token_handle,
406 int max_retries, 406 int max_retries,
407 Delegate* delegate) { 407 Delegate* delegate) {
408 return core_->GetTokenInfo("token_handle", token_handle, max_retries, 408 return core_->GetTokenInfo("token_handle", token_handle, max_retries,
409 delegate); 409 delegate);
410 } 410 }
411 411
412 } // namespace gaia 412 } // namespace gaia
OLDNEW
« no previous file with comments | « google_apis/gaia/gaia_auth_util.cc ('k') | google_apis/gaia/oauth2_access_token_fetcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698