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

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: Rebase onto CL 7532020 and update remoting 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
« no previous file with comments | « crypto/hmac_mac.cc ('k') | net/http/http_mac_signature.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7a1e9719585e1b57a762b0bebdb2afc799d1aec5 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 the Authorization header for use in 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_;
« no previous file with comments | « crypto/hmac_mac.cc ('k') | net/http/http_mac_signature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698