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

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

Issue 7059018: Replace escape function in third-party by escape function in net/base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/net/gaia/gaia_auth_fetcher.cc
diff --git a/chrome/common/net/gaia/gaia_auth_fetcher.cc b/chrome/common/net/gaia/gaia_auth_fetcher.cc
index 2448c1279555af9cf7d46c94510927fb84a1c04f..c8d5311e66f2a39e1e109b67b783a93d16141f2e 100644
--- a/chrome/common/net/gaia/gaia_auth_fetcher.cc
+++ b/chrome/common/net/gaia/gaia_auth_fetcher.cc
@@ -15,10 +15,10 @@
#include "chrome/common/net/gaia/gaia_constants.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
#include "chrome/common/net/http_return.h"
+#include "net/base/escape.h"
#include "net/base/load_flags.h"
#include "net/url_request/url_request_context_getter.h"
#include "net/url_request/url_request_status.h"
-#include "third_party/libjingle/source/talk/base/urlencode.h"
// TODO(chron): Add sourceless version of this formatter.
// static
@@ -143,10 +143,10 @@ std::string GaiaAuthFetcher::MakeClientLoginBody(
const std::string& login_token,
const std::string& login_captcha,
HostedAccountsSetting allow_hosted_accounts) {
- std::string encoded_username = UrlEncodeString(username);
- std::string encoded_password = UrlEncodeString(password);
- std::string encoded_login_token = UrlEncodeString(login_token);
- std::string encoded_login_captcha = UrlEncodeString(login_captcha);
+ std::string encoded_username = EscapeUrlEncodedData(username);
+ std::string encoded_password = EscapeUrlEncodedData(password);
+ std::string encoded_login_token = EscapeUrlEncodedData(login_token);
+ std::string encoded_login_captcha = EscapeUrlEncodedData(login_captcha);
const char* account_type = allow_hosted_accounts == HostedAccountsAllowed ?
kAccountTypeHostedOrGoogle :
@@ -179,8 +179,8 @@ std::string GaiaAuthFetcher::MakeIssueAuthTokenBody(
const std::string& sid,
const std::string& lsid,
const char* const service) {
- std::string encoded_sid = UrlEncodeString(sid);
- std::string encoded_lsid = UrlEncodeString(lsid);
+ std::string encoded_sid = EscapeUrlEncodedData(sid);
+ std::string encoded_lsid = EscapeUrlEncodedData(lsid);
// All tokens should be session tokens except the gaia auth token.
bool session = true;
@@ -196,7 +196,7 @@ std::string GaiaAuthFetcher::MakeIssueAuthTokenBody(
// static
std::string GaiaAuthFetcher::MakeGetUserInfoBody(const std::string& lsid) {
- std::string encoded_lsid = UrlEncodeString(lsid);
+ std::string encoded_lsid = EscapeUrlEncodedData(lsid);
return base::StringPrintf(kGetUserInfoFormat, encoded_lsid.c_str());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698