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

Unified Diff: chrome/common/net/gaia/gaia_oauth_client.cc

Issue 7057053: Escaping file names correctly. Also fixed a crush in chromeos debug build while saving a web page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missed fix. Created 9 years, 6 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/common/net/gaia/gaia_authenticator.cc ('k') | net/base/escape.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/net/gaia/gaia_oauth_client.cc
diff --git a/chrome/common/net/gaia/gaia_oauth_client.cc b/chrome/common/net/gaia/gaia_oauth_client.cc
index 5ad361b870175985a53d6a49f191c721aab1db27..8cdec59155c10c275911243d30526afa61419713 100644
--- a/chrome/common/net/gaia/gaia_oauth_client.cc
+++ b/chrome/common/net/gaia/gaia_oauth_client.cc
@@ -76,10 +76,10 @@ void GaiaOAuthClient::Core::GetTokensFromAuthCode(
int max_retries,
GaiaOAuthClient::Delegate* delegate) {
std::string post_body =
- "code=" + EscapeUrlEncodedData(auth_code) +
- "&client_id=" + EscapeUrlEncodedData(oauth_client_info.client_id) +
+ "code=" + EscapeUrlEncodedData(auth_code, true) +
+ "&client_id=" + EscapeUrlEncodedData(oauth_client_info.client_id, true) +
"&client_secret=" +
- EscapeUrlEncodedData(oauth_client_info.client_secret) +
+ EscapeUrlEncodedData(oauth_client_info.client_secret, true) +
"&redirect_uri=oob&grant_type=authorization_code";
MakeGaiaRequest(post_body, max_retries, delegate);
}
@@ -90,10 +90,10 @@ void GaiaOAuthClient::Core::RefreshToken(
int max_retries,
GaiaOAuthClient::Delegate* delegate) {
std::string post_body =
- "refresh_token=" + EscapeUrlEncodedData(refresh_token) +
- "&client_id=" + EscapeUrlEncodedData(oauth_client_info.client_id) +
+ "refresh_token=" + EscapeUrlEncodedData(refresh_token, true) +
+ "&client_id=" + EscapeUrlEncodedData(oauth_client_info.client_id, true) +
"&client_secret=" +
- EscapeUrlEncodedData(oauth_client_info.client_secret) +
+ EscapeUrlEncodedData(oauth_client_info.client_secret, true) +
"&grant_type=refresh_token";
MakeGaiaRequest(post_body, max_retries, delegate);
}
« no previous file with comments | « chrome/common/net/gaia/gaia_authenticator.cc ('k') | net/base/escape.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698