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

Side by Side Diff: net/url_request/url_request_http_job.cc

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, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_mac_signature_unittest.cc ('k') | remoting/protocol/jingle_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/url_request/url_request_http_job.h" 5 #include "net/url_request/url_request_http_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 for (size_t i = 0; i < cookie_infos.size(); ++i) { 68 for (size_t i = 0; i < cookie_infos.size(); ++i) {
69 HttpMacSignature signature; 69 HttpMacSignature signature;
70 if (!signature.AddStateInfo(cookie_infos[i].name, 70 if (!signature.AddStateInfo(cookie_infos[i].name,
71 cookie_infos[i].creation_date, 71 cookie_infos[i].creation_date,
72 cookie_infos[i].mac_key, 72 cookie_infos[i].mac_key,
73 cookie_infos[i].mac_algorithm)) { 73 cookie_infos[i].mac_algorithm)) {
74 continue; 74 continue;
75 } 75 }
76 if (!signature.AddHttpInfo(method, request_uri, host, port)) 76 if (!signature.AddHttpInfo(method, request_uri, host, port))
77 continue; 77 continue;
78 request_info->extra_headers.SetHeader( 78 std::string authorization_header;
79 HttpRequestHeaders::kAuthorization, 79 if (!signature.GenerateAuthorizationHeader(&authorization_header))
80 signature.GenerateAuthorizationHeader()); 80 continue;
81 request_info->extra_headers.SetHeader(HttpRequestHeaders::kAuthorization,
82 authorization_header);
81 return; // Only add the first valid header. 83 return; // Only add the first valid header.
82 } 84 }
83 } 85 }
84 86
85 class HTTPSProberDelegateImpl : public HTTPSProberDelegate { 87 class HTTPSProberDelegateImpl : public HTTPSProberDelegate {
86 public: 88 public:
87 HTTPSProberDelegateImpl(const std::string& host, int max_age, 89 HTTPSProberDelegateImpl(const std::string& host, int max_age,
88 bool include_subdomains, 90 bool include_subdomains,
89 TransportSecurityState* sts) 91 TransportSecurityState* sts)
90 : host_(host), 92 : host_(host),
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 if (done_) 1579 if (done_)
1578 return; 1580 return;
1579 done_ = true; 1581 done_ = true;
1580 1582
1581 RecordPerfHistograms(reason); 1583 RecordPerfHistograms(reason);
1582 if (reason == FINISHED) 1584 if (reason == FINISHED)
1583 RecordCompressionHistograms(); 1585 RecordCompressionHistograms();
1584 } 1586 }
1585 1587
1586 } // namespace net 1588 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_mac_signature_unittest.cc ('k') | remoting/protocol/jingle_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698