| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/https_prober.h" | 5 #include "net/url_request/https_prober.h" |
| 6 | 6 |
| 7 #include "net/url_request/url_request.h" | 7 #include "net/url_request/url_request.h" |
| 8 #include "net/url_request/url_request_context.h" | 8 #include "net/url_request/url_request_context.h" |
| 9 | 9 |
| 10 namespace net { | 10 namespace net { |
| 11 | 11 |
| 12 HTTPSProber::HTTPSProber() { | 12 HTTPSProber::HTTPSProber() { |
| 13 } | 13 } |
| 14 | 14 |
| 15 HTTPSProber::~HTTPSProber() { | 15 HTTPSProber::~HTTPSProber() { |
| 16 } | 16 } |
| 17 | 17 |
| 18 // static |
| 19 HTTPSProber* HTTPSProber::GetInstance() { |
| 20 return Singleton<HTTPSProber>::get(); |
| 21 } |
| 22 |
| 18 bool HTTPSProber::HaveProbed(const std::string& host) const { | 23 bool HTTPSProber::HaveProbed(const std::string& host) const { |
| 19 return probed_.find(host) != probed_.end(); | 24 return probed_.find(host) != probed_.end(); |
| 20 } | 25 } |
| 21 | 26 |
| 22 bool HTTPSProber::InFlight(const std::string& host) const { | 27 bool HTTPSProber::InFlight(const std::string& host) const { |
| 23 return inflight_probes_.find(host) != inflight_probes_.end(); | 28 return inflight_probes_.find(host) != inflight_probes_.end(); |
| 24 } | 29 } |
| 25 | 30 |
| 26 bool HTTPSProber::ProbeHost(const std::string& host, URLRequestContext* ctx, | 31 bool HTTPSProber::ProbeHost(const std::string& host, URLRequestContext* ctx, |
| 27 HTTPSProberDelegate* delegate) { | 32 HTTPSProberDelegate* delegate) { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 } else { | 82 } else { |
| 78 Failure(request); | 83 Failure(request); |
| 79 } | 84 } |
| 80 } | 85 } |
| 81 | 86 |
| 82 void HTTPSProber::OnReadCompleted(net::URLRequest* request, int bytes_read) { | 87 void HTTPSProber::OnReadCompleted(net::URLRequest* request, int bytes_read) { |
| 83 NOTREACHED(); | 88 NOTREACHED(); |
| 84 } | 89 } |
| 85 | 90 |
| 86 } // namespace net | 91 } // namespace net |
| OLD | NEW |