• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #ifndef CHROME_BROWSER_SSL_SSL_REQUEST_INFO_H_
6 #define CHROME_BROWSER_SSL_SSL_REQUEST_INFO_H_
7 #pragma once
8 
9 #include <string>
10 
11 #include "base/memory/ref_counted.h"
12 #include "googleurl/src/gurl.h"
13 #include "webkit/glue/resource_type.h"
14 
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
17 // need to deal with the request asynchronously.
18 class SSLRequestInfo : public base::RefCounted<SSLRequestInfo> {
19  public:
20   SSLRequestInfo(const GURL& url,
21                  ResourceType::Type resource_type,
22                  int child_id,
23                  int ssl_cert_id,
24                  int ssl_cert_status);
25 
url()26   const GURL& url() const { return url_; }
resource_type()27   ResourceType::Type resource_type() const { return resource_type_; }
child_id()28   int child_id() const { return child_id_; }
ssl_cert_id()29   int ssl_cert_id() const { return ssl_cert_id_; }
ssl_cert_status()30   int ssl_cert_status() const { return ssl_cert_status_; }
31 
32  private:
33   friend class base::RefCounted<SSLRequestInfo>;
34 
35   virtual ~SSLRequestInfo();
36 
37   GURL url_;
38   ResourceType::Type resource_type_;
39   int child_id_;
40   int ssl_cert_id_;
41   int ssl_cert_status_;
42 
43   DISALLOW_COPY_AND_ASSIGN(SSLRequestInfo);
44 };
45 
46 #endif  // CHROME_BROWSER_SSL_SSL_REQUEST_INFO_H_
47