Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 std::string authorization_header; | |
| 79 if (!signature.GenerateAuthorizationHeader(&authorization_header)) | |
| 80 continue; | |
| 78 request_info->extra_headers.SetHeader( | 81 request_info->extra_headers.SetHeader( |
| 79 HttpRequestHeaders::kAuthorization, | 82 HttpRequestHeaders::kAuthorization, |
| 80 signature.GenerateAuthorizationHeader()); | 83 authorization_header); |
|
wtc
2011/07/28 18:11:41
Nit: this should fit on the previous line.
| |
| 81 return; // Only add the first valid header. | 84 return; // Only add the first valid header. |
| 82 } | 85 } |
| 83 } | 86 } |
| 84 | 87 |
| 85 class HTTPSProberDelegateImpl : public HTTPSProberDelegate { | 88 class HTTPSProberDelegateImpl : public HTTPSProberDelegate { |
| 86 public: | 89 public: |
| 87 HTTPSProberDelegateImpl(const std::string& host, int max_age, | 90 HTTPSProberDelegateImpl(const std::string& host, int max_age, |
| 88 bool include_subdomains, | 91 bool include_subdomains, |
| 89 TransportSecurityState* sts) | 92 TransportSecurityState* sts) |
| 90 : host_(host), | 93 : host_(host), |
| (...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1565 if (done_) | 1568 if (done_) |
| 1566 return; | 1569 return; |
| 1567 done_ = true; | 1570 done_ = true; |
| 1568 | 1571 |
| 1569 RecordPerfHistograms(reason); | 1572 RecordPerfHistograms(reason); |
| 1570 if (reason == FINISHED) | 1573 if (reason == FINISHED) |
| 1571 RecordCompressionHistograms(); | 1574 RecordCompressionHistograms(); |
| 1572 } | 1575 } |
| 1573 | 1576 |
| 1574 } // namespace net | 1577 } // namespace net |
| OLD | NEW |