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

Unified Diff: trunk/src/google_apis/gaia/oauth_request_signer.cc

Issue 111883004: Revert 239921 "Revert 239759 "The comment in base64.h implies th..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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: trunk/src/google_apis/gaia/oauth_request_signer.cc
===================================================================
--- trunk/src/google_apis/gaia/oauth_request_signer.cc (revision 239942)
+++ trunk/src/google_apis/gaia/oauth_request_signer.cc (working copy)
@@ -204,10 +204,12 @@
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;
}

Powered by Google App Engine
This is Rietveld 408576698