summaryrefslogtreecommitdiffstats
path: root/google_apis/gaia/gaia_auth_fetcher.cc
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-09 05:45:17 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-09 05:45:17 +0000
commite59558b78e8c6a1b0bd916a724724b638c3c91b6 (patch)
tree712268a7e9e1cd552f309d89641b2bed5ad06322 /google_apis/gaia/gaia_auth_fetcher.cc
parent31fcd34da3797bc49160620ef8c94a38652c0587 (diff)
downloadchromium_src-e59558b78e8c6a1b0bd916a724724b638c3c91b6.zip
chromium_src-e59558b78e8c6a1b0bd916a724724b638c3c91b6.tar.gz
chromium_src-e59558b78e8c6a1b0bd916a724724b638c3c91b6.tar.bz2
Rewrite std::string("") to std::string(), Linux edition.
This patch was generated by running the empty_string clang tool across the Chromium Linux compilation database. Implicitly or explicitly constructing std::string() with a "" argument is inefficient as the caller needs to emit extra instructions to pass an argument, and the constructor needlessly copies a byte into internal storage. Rewriting these instances to simply call the default constructor appears to save ~14-18 kilobytes on an optimized release build. BUG=none Review URL: https://codereview.chromium.org/13145003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193020 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_apis/gaia/gaia_auth_fetcher.cc')
-rw-r--r--google_apis/gaia/gaia_auth_fetcher.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/google_apis/gaia/gaia_auth_fetcher.cc b/google_apis/gaia/gaia_auth_fetcher.cc
index 9354447..15aa78a 100644
--- a/google_apis/gaia/gaia_auth_fetcher.cc
+++ b/google_apis/gaia/gaia_auth_fetcher.cc
@@ -617,7 +617,7 @@ void GaiaAuthFetcher::StartClientLogin(
allow_hosted_accounts);
fetcher_.reset(CreateGaiaFetcher(getter_,
request_body_,
- "",
+ std::string(),
client_login_gurl_,
kLoadFlagsIgnoreCookies,
this));
@@ -635,7 +635,7 @@ void GaiaAuthFetcher::StartIssueAuthToken(const std::string& sid,
request_body_ = MakeIssueAuthTokenBody(sid, lsid, service);
fetcher_.reset(CreateGaiaFetcher(getter_,
request_body_,
- "",
+ std::string(),
issue_auth_token_gurl_,
kLoadFlagsIgnoreCookies,
this));
@@ -669,7 +669,7 @@ void GaiaAuthFetcher::StartRevokeOAuth2Token(const std::string& auth_token) {
request_body_ = MakeRevokeTokenBody(auth_token);
fetcher_.reset(CreateGaiaFetcher(getter_,
request_body_,
- "",
+ std::string(),
oauth2_revoke_gurl_,
kLoadFlagsIgnoreCookies,
this));
@@ -692,7 +692,7 @@ void GaiaAuthFetcher::StartCookieForOAuthLoginTokenExchange(
fetcher_.reset(CreateGaiaFetcher(getter_,
request_body_,
- "",
+ std::string(),
client_login_to_oauth2_gurl_,
net::LOAD_NORMAL,
this));
@@ -708,7 +708,7 @@ void GaiaAuthFetcher::StartAuthCodeForOAuth2TokenExchange(
request_body_ = MakeGetTokenPairBody(auth_code);
fetcher_.reset(CreateGaiaFetcher(getter_,
request_body_,
- "",
+ std::string(),
oauth2_token_gurl_,
kLoadFlagsIgnoreCookies,
this));
@@ -723,7 +723,7 @@ void GaiaAuthFetcher::StartGetUserInfo(const std::string& lsid) {
request_body_ = MakeGetUserInfoBody(lsid);
fetcher_.reset(CreateGaiaFetcher(getter_,
request_body_,
- "",
+ std::string(),
get_user_info_gurl_,
kLoadFlagsIgnoreCookies,
this));
@@ -748,7 +748,7 @@ void GaiaAuthFetcher::StartMergeSession(const std::string& uber_token) {
request_body_ = MakeMergeSessionBody(uber_token, continue_url, source_);
fetcher_.reset(CreateGaiaFetcher(getter_,
request_body_,
- "",
+ std::string(),
merge_session_gurl_,
net::LOAD_NORMAL,
this));
@@ -765,7 +765,7 @@ void GaiaAuthFetcher::StartTokenFetchForUberAuthExchange(
std::string authentication_header =
base::StringPrintf(kOAuthHeaderFormat, access_token.c_str());
fetcher_.reset(CreateGaiaFetcher(getter_,
- "",
+ std::string(),
authentication_header,
uberauth_token_gurl_,
kLoadFlagsIgnoreCookies,
@@ -785,7 +785,7 @@ void GaiaAuthFetcher::StartClientOAuth(const std::string& username,
source_, locale);
fetcher_.reset(CreateGaiaFetcher(getter_,
request_body_,
- "",
+ std::string(),
client_oauth_gurl_,
kLoadFlagsIgnoreCookies,
this));
@@ -814,7 +814,7 @@ void GaiaAuthFetcher::StartClientOAuthChallengeResponse(
request_body_ = MakeClientOAuthChallengeResponseBody(name, token, solution);
fetcher_.reset(CreateGaiaFetcher(getter_,
request_body_,
- "",
+ std::string(),
client_oauth_gurl_,
kLoadFlagsIgnoreCookies,
this));