| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_SSL_SSL_REQUEST_INFO_H_ | 5 #ifndef CONTENT_BROWSER_SSL_SSL_REQUEST_INFO_H_ |
| 6 #define CONTENT_BROWSER_SSL_SSL_REQUEST_INFO_H_ | 6 #define CONTENT_BROWSER_SSL_SSL_REQUEST_INFO_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "content/public/common/resource_type.h" | 11 #include "content/public/common/resource_type.h" |
| 12 #include "net/cert/cert_status_flags.h" | 12 #include "net/cert/cert_status_flags.h" |
| 13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 // SSLRequestInfo wraps up the information SSLPolicy needs about a request in | 17 // SSLRequestInfo wraps up the information SSLPolicy needs about a request in |
| 18 // order to update our security IU. SSLRequestInfo is RefCounted in case we | 18 // order to update our security IU. SSLRequestInfo is RefCounted in case we |
| 19 // need to deal with the request asynchronously. | 19 // need to deal with the request asynchronously. |
| 20 class SSLRequestInfo : public base::RefCounted<SSLRequestInfo> { | 20 class SSLRequestInfo : public base::RefCounted<SSLRequestInfo> { |
| 21 public: | 21 public: |
| 22 SSLRequestInfo(const GURL& url, | 22 SSLRequestInfo(const GURL& url, |
| 23 ResourceType::Type resource_type, | 23 ResourceType resource_type, |
| 24 int child_id, | 24 int child_id, |
| 25 int ssl_cert_id, | 25 int ssl_cert_id, |
| 26 net::CertStatus ssl_cert_status); | 26 net::CertStatus ssl_cert_status); |
| 27 | 27 |
| 28 const GURL& url() const { return url_; } | 28 const GURL& url() const { return url_; } |
| 29 ResourceType::Type resource_type() const { return resource_type_; } | 29 ResourceType resource_type() const { return resource_type_; } |
| 30 int child_id() const { return child_id_; } | 30 int child_id() const { return child_id_; } |
| 31 int ssl_cert_id() const { return ssl_cert_id_; } | 31 int ssl_cert_id() const { return ssl_cert_id_; } |
| 32 net::CertStatus ssl_cert_status() const { return ssl_cert_status_; } | 32 net::CertStatus ssl_cert_status() const { return ssl_cert_status_; } |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 friend class base::RefCounted<SSLRequestInfo>; | 35 friend class base::RefCounted<SSLRequestInfo>; |
| 36 | 36 |
| 37 virtual ~SSLRequestInfo(); | 37 virtual ~SSLRequestInfo(); |
| 38 | 38 |
| 39 GURL url_; | 39 GURL url_; |
| 40 ResourceType::Type resource_type_; | 40 ResourceType resource_type_; |
| 41 int child_id_; | 41 int child_id_; |
| 42 int ssl_cert_id_; | 42 int ssl_cert_id_; |
| 43 net::CertStatus ssl_cert_status_; | 43 net::CertStatus ssl_cert_status_; |
| 44 | 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(SSLRequestInfo); | 45 DISALLOW_COPY_AND_ASSIGN(SSLRequestInfo); |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 } // namespace content | 48 } // namespace content |
| 49 | 49 |
| 50 #endif // CONTENT_BROWSER_SSL_SSL_REQUEST_INFO_H_ | 50 #endif // CONTENT_BROWSER_SSL_SSL_REQUEST_INFO_H_ |
| OLD | NEW |