| OLD | NEW |
| 1 // Copyright (c) 2010 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 #ifndef NET_BASE_HTTPS_PROBER_H_ | 5 #ifndef NET_BASE_HTTPS_PROBER_H_ |
| 6 #define NET_BASE_HTTPS_PROBER_H_ | 6 #define NET_BASE_HTTPS_PROBER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/task.h" | 13 #include "base/task.h" |
| 14 #include "net/url_request/url_request.h" | 14 #include "net/url_request/url_request.h" |
| 15 | 15 |
| 16 template <typename T> struct DefaultSingletonTraits; | 16 template <typename T> struct DefaultSingletonTraits; |
| 17 class URLRequestContext; | |
| 18 | 17 |
| 19 namespace net { | 18 namespace net { |
| 20 | 19 |
| 20 class URLRequestContext; |
| 21 |
| 21 // This should be scoped inside HTTPSProber, but VC cannot compile | 22 // This should be scoped inside HTTPSProber, but VC cannot compile |
| 22 // HTTPProber::Delegate when HTTPSProber also inherits from | 23 // HTTPProber::Delegate when HTTPSProber also inherits from |
| 23 // net::URLRequest::Delegate. | 24 // net::URLRequest::Delegate. |
| 24 class HTTPSProberDelegate { | 25 class HTTPSProberDelegate { |
| 25 public: | 26 public: |
| 26 virtual void ProbeComplete(bool result) = 0; | 27 virtual void ProbeComplete(bool result) = 0; |
| 27 protected: | 28 protected: |
| 28 virtual ~HTTPSProberDelegate() {} | 29 virtual ~HTTPSProberDelegate() {} |
| 29 }; | 30 }; |
| 30 | 31 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 void DoCallback(net::URLRequest* request, bool result); | 71 void DoCallback(net::URLRequest* request, bool result); |
| 71 | 72 |
| 72 std::map<std::string, HTTPSProberDelegate*> inflight_probes_; | 73 std::map<std::string, HTTPSProberDelegate*> inflight_probes_; |
| 73 std::set<std::string> probed_; | 74 std::set<std::string> probed_; |
| 74 | 75 |
| 75 friend struct DefaultSingletonTraits<HTTPSProber>; | 76 friend struct DefaultSingletonTraits<HTTPSProber>; |
| 76 DISALLOW_COPY_AND_ASSIGN(HTTPSProber); | 77 DISALLOW_COPY_AND_ASSIGN(HTTPSProber); |
| 77 }; | 78 }; |
| 78 | 79 |
| 79 } // namespace net | 80 } // namespace net |
| 80 #endif | 81 |
| 82 #endif // NET_BASE_HTTPS_PROBER_H_ |
| OLD | NEW |