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

Unified Diff: google_apis/gaia/oauth_request_signer.cc

Issue 86913002: Make base::Base64Encode() return void (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: One more chromeos-specific fix. Created 7 years 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
Index: google_apis/gaia/oauth_request_signer.cc
diff --git a/google_apis/gaia/oauth_request_signer.cc b/google_apis/gaia/oauth_request_signer.cc
index fe65d4fa5bbdb0243a9a4c82edaf40ca8eb23ee4..115c14d6f01f8c1f8ed43f4956abfa4d8af8daa3 100644
--- a/google_apis/gaia/oauth_request_signer.cc
+++ b/google_apis/gaia/oauth_request_signer.cc
@@ -204,10 +204,12 @@ bool SignHmacSha1(const std::string& text,
DCHECK(hmac.DigestLength() == kHmacDigestLength);
unsigned char digest[kHmacDigestLength];
bool result = hmac.Init(key) &&
- hmac.Sign(text, digest, kHmacDigestLength) &&
- base::Base64Encode(std::string(reinterpret_cast<const char*>(digest),
- kHmacDigestLength),
- signature_return);
+ hmac.Sign(text, digest, kHmacDigestLength);
+ if (result) {
+ base::Base64Encode(
+ std::string(reinterpret_cast<const char*>(digest), kHmacDigestLength),
+ signature_return);
+ }
return result;
}
« no previous file with comments | « google_apis/cup/client_update_protocol.cc ('k') | jingle/notifier/listener/push_notifications_send_update_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698