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

Unified Diff: net/http/http_mac_signature.h

Issue 7522014: Add WARN_UNUSED_RESULT to crypto/hmac.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix a few more unchecked places from the clang bots Created 9 years, 5 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
Index: net/http/http_mac_signature.h
diff --git a/net/http/http_mac_signature.h b/net/http/http_mac_signature.h
index 00191e1aec362ad607df3cdb12416216a3e16dd7..f04d2b6d5666b392f8fa6c169aa0fcacf66f0c94 100644
--- a/net/http/http_mac_signature.h
+++ b/net/http/http_mac_signature.h
@@ -39,20 +39,24 @@ class NET_TEST HttpMacSignature {
const std::string& host,
int port);
- // Returns the value of the Authorization header for use in an HTTP request.
- std::string GenerateAuthorizationHeader();
+ // Generates a value suitable for the Authorization header of an HTTP
+ // request. If successfully generated, returns true and stores the resultant
+ // header in |*header|.
+ bool GenerateAuthorizationHeader(std::string* header);
private:
FRIEND_TEST_ALL_PREFIXES(HttpMacSignatureTest, GenerateHeaderString);
FRIEND_TEST_ALL_PREFIXES(HttpMacSignatureTest, GenerateNormalizedRequest);
FRIEND_TEST_ALL_PREFIXES(HttpMacSignatureTest, GenerateMAC);
- std::string GenerateHeaderString(const std::string& age,
- const std::string& nonce);
+ bool GenerateHeaderString(const std::string& age,
+ const std::string& nonce,
+ std::string* header);
std::string GenerateNormalizedRequest(const std::string& age,
const std::string& nonce);
- std::string GenerateMAC(const std::string& age,
- const std::string& nonce);
+ bool GenerateMAC(const std::string& age,
+ const std::string& nonce,
+ std::string* mac);
std::string id_;
base::Time creation_date_;

Powered by Google App Engine
This is Rietveld 408576698