| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 domain_state); | 930 domain_state); |
| 931 continue; | 931 continue; |
| 932 } | 932 } |
| 933 | 933 |
| 934 if (!request()) | 934 if (!request()) |
| 935 break; | 935 break; |
| 936 | 936 |
| 937 // At this point, we have a request for opportunistic encryption over HTTP. | 937 // At this point, we have a request for opportunistic encryption over HTTP. |
| 938 // In this case we need to probe to check that we can make HTTPS | 938 // In this case we need to probe to check that we can make HTTPS |
| 939 // connections to that host. | 939 // connections to that host. |
| 940 net::HTTPSProber* const prober = Singleton<net::HTTPSProber>::get(); | 940 net::HTTPSProber* const prober = net::HTTPSProber::GetInstance(); |
| 941 if (prober->HaveProbed(request_info_.url.host()) || | 941 if (prober->HaveProbed(request_info_.url.host()) || |
| 942 prober->InFlight(request_info_.url.host())) { | 942 prober->InFlight(request_info_.url.host())) { |
| 943 continue; | 943 continue; |
| 944 } | 944 } |
| 945 | 945 |
| 946 HTTPSProberDelegate* delegate = | 946 HTTPSProberDelegate* delegate = |
| 947 new HTTPSProberDelegate(request_info_.url.host(), max_age, | 947 new HTTPSProberDelegate(request_info_.url.host(), max_age, |
| 948 include_subdomains, | 948 include_subdomains, |
| 949 ctx->transport_security_state()); | 949 ctx->transport_security_state()); |
| 950 if (!prober->ProbeHost(request_info_.url.host(), request()->context(), | 950 if (!prober->ProbeHost(request_info_.url.host(), request()->context(), |
| 951 delegate)) { | 951 delegate)) { |
| 952 delete delegate; | 952 delete delegate; |
| 953 } | 953 } |
| 954 } | 954 } |
| 955 } | 955 } |
| OLD | NEW |