| 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 #ifndef CHROME_BROWSER_SSL_SSL_REQUEST_INFO_H_ | 5 #ifndef CHROME_BROWSER_SSL_SSL_REQUEST_INFO_H_ |
| 6 #define CHROME_BROWSER_SSL_SSL_REQUEST_INFO_H_ | 6 #define CHROME_BROWSER_SSL_SSL_REQUEST_INFO_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" |
| 12 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
| 13 #include "webkit/glue/resource_type.h" | 13 #include "webkit/glue/resource_type.h" |
| 14 | 14 |
| 15 // SSLRequestInfo wraps up the information SSLPolicy needs about a request in | 15 // SSLRequestInfo wraps up the information SSLPolicy needs about a request in |
| 16 // order to update our security IU. SSLRequestInfo is RefCounted in case we | 16 // order to update our security IU. SSLRequestInfo is RefCounted in case we |
| 17 // need to deal with the request asynchronously. | 17 // need to deal with the request asynchronously. |
| 18 class SSLRequestInfo : public base::RefCounted<SSLRequestInfo> { | 18 class SSLRequestInfo : public base::RefCounted<SSLRequestInfo> { |
| 19 public: | 19 public: |
| 20 SSLRequestInfo(const GURL& url, | 20 SSLRequestInfo(const GURL& url, |
| 21 ResourceType::Type resource_type, | 21 ResourceType::Type resource_type, |
| 22 const std::string& frame_origin, | 22 const std::string& frame_origin, |
| 23 const std::string& main_frame_origin, | 23 const std::string& main_frame_origin, |
| 24 int child_id, | 24 int child_id, |
| 25 int ssl_cert_id, | 25 int ssl_cert_id, |
| 26 int ssl_cert_status); | 26 int ssl_cert_status, |
| 27 string16 tls_username); |
| 27 | 28 |
| 28 const GURL& url() const { return url_; } | 29 const GURL& url() const { return url_; } |
| 29 ResourceType::Type resource_type() const { return resource_type_; } | 30 ResourceType::Type resource_type() const { return resource_type_; } |
| 30 const std::string& frame_origin() const { return frame_origin_; } | 31 const std::string& frame_origin() const { return frame_origin_; } |
| 31 const std::string& main_frame_origin() const { return main_frame_origin_; } | 32 const std::string& main_frame_origin() const { return main_frame_origin_; } |
| 32 int child_id() const { return child_id_; } | 33 int child_id() const { return child_id_; } |
| 33 int ssl_cert_id() const { return ssl_cert_id_; } | 34 int ssl_cert_id() const { return ssl_cert_id_; } |
| 34 int ssl_cert_status() const { return ssl_cert_status_; } | 35 int ssl_cert_status() const { return ssl_cert_status_; } |
| 36 string16 tls_username() const { return tls_username_; } |
| 35 | 37 |
| 36 private: | 38 private: |
| 37 friend class base::RefCounted<SSLRequestInfo>; | 39 friend class base::RefCounted<SSLRequestInfo>; |
| 38 | 40 |
| 39 virtual ~SSLRequestInfo(); | 41 virtual ~SSLRequestInfo(); |
| 40 | 42 |
| 41 GURL url_; | 43 GURL url_; |
| 42 ResourceType::Type resource_type_; | 44 ResourceType::Type resource_type_; |
| 43 std::string frame_origin_; | 45 std::string frame_origin_; |
| 44 std::string main_frame_origin_; | 46 std::string main_frame_origin_; |
| 45 int child_id_; | 47 int child_id_; |
| 46 int ssl_cert_id_; | 48 int ssl_cert_id_; |
| 47 int ssl_cert_status_; | 49 int ssl_cert_status_; |
| 50 string16 tls_username_; |
| 48 | 51 |
| 49 DISALLOW_COPY_AND_ASSIGN(SSLRequestInfo); | 52 DISALLOW_COPY_AND_ASSIGN(SSLRequestInfo); |
| 50 }; | 53 }; |
| 51 | 54 |
| 52 #endif // CHROME_BROWSER_SSL_SSL_REQUEST_INFO_H_ | 55 #endif // CHROME_BROWSER_SSL_SSL_REQUEST_INFO_H_ |
| OLD | NEW |