Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: content/browser/renderer_host/resource_request_details.h

Issue 7969023: For the SSL cert status, convert anonymous enum that gives bit values into a typedefed uint32. Th... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/load_from_memory_cache_details.cc ('k') | content/browser/ssl/ssl_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 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 // The ResourceRequestDetails object contains additional details about a 5 // The ResourceRequestDetails object contains additional details about a
6 // resource request. It copies many of the publicly accessible member variables 6 // resource request. It copies many of the publicly accessible member variables
7 // of net::URLRequest, but exists on the UI thread. 7 // of net::URLRequest, but exists on the UI thread.
8 8
9 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_ 9 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_
10 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_ 10 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_
11 #pragma once 11 #pragma once
12 12
13 #include <string> 13 #include <string>
14 14
15 #include "googleurl/src/gurl.h" 15 #include "googleurl/src/gurl.h"
16 #include "net/base/cert_status_flags.h"
16 #include "net/base/host_port_pair.h" 17 #include "net/base/host_port_pair.h"
17 #include "net/url_request/url_request_status.h" 18 #include "net/url_request/url_request_status.h"
18 #include "webkit/glue/resource_type.h" 19 #include "webkit/glue/resource_type.h"
19 20
20 namespace net { 21 namespace net {
21 class URLRequest; 22 class URLRequest;
22 } // namespace net 23 } // namespace net
23 24
24 // Details about a resource request notification. 25 // Details about a resource request notification.
25 class ResourceRequestDetails { 26 class ResourceRequestDetails {
26 public: 27 public:
27 ResourceRequestDetails(const net::URLRequest* request, int cert_id); 28 ResourceRequestDetails(const net::URLRequest* request, int cert_id);
28 29
29 virtual ~ResourceRequestDetails(); 30 virtual ~ResourceRequestDetails();
30 31
31 const GURL& url() const { return url_; } 32 const GURL& url() const { return url_; }
32 const GURL& original_url() const { return original_url_; } 33 const GURL& original_url() const { return original_url_; }
33 const std::string& method() const { return method_; } 34 const std::string& method() const { return method_; }
34 const std::string& referrer() const { return referrer_; } 35 const std::string& referrer() const { return referrer_; }
35 bool has_upload() const { return has_upload_; } 36 bool has_upload() const { return has_upload_; }
36 int load_flags() const { return load_flags_; } 37 int load_flags() const { return load_flags_; }
37 int origin_child_id() const { return origin_child_id_; } 38 int origin_child_id() const { return origin_child_id_; }
38 const net::URLRequestStatus& status() const { return status_; } 39 const net::URLRequestStatus& status() const { return status_; }
39 int ssl_cert_id() const { return ssl_cert_id_; } 40 int ssl_cert_id() const { return ssl_cert_id_; }
40 int ssl_cert_status() const { return ssl_cert_status_; } 41 net::CertStatus ssl_cert_status() const { return ssl_cert_status_; }
41 ResourceType::Type resource_type() const { return resource_type_; } 42 ResourceType::Type resource_type() const { return resource_type_; }
42 net::HostPortPair socket_address() const { return socket_address_; } 43 net::HostPortPair socket_address() const { return socket_address_; }
43 44
44 private: 45 private:
45 GURL url_; 46 GURL url_;
46 GURL original_url_; 47 GURL original_url_;
47 std::string method_; 48 std::string method_;
48 std::string referrer_; 49 std::string referrer_;
49 bool has_upload_; 50 bool has_upload_;
50 int load_flags_; 51 int load_flags_;
51 int origin_child_id_; 52 int origin_child_id_;
52 net::URLRequestStatus status_; 53 net::URLRequestStatus status_;
53 int ssl_cert_id_; 54 int ssl_cert_id_;
54 int ssl_cert_status_; 55 net::CertStatus ssl_cert_status_;
55 ResourceType::Type resource_type_; 56 ResourceType::Type resource_type_;
56 net::HostPortPair socket_address_; 57 net::HostPortPair socket_address_;
57 }; 58 };
58 59
59 // Details about a redirection of a resource request. 60 // Details about a redirection of a resource request.
60 class ResourceRedirectDetails : public ResourceRequestDetails { 61 class ResourceRedirectDetails : public ResourceRequestDetails {
61 public: 62 public:
62 ResourceRedirectDetails(const net::URLRequest* request, 63 ResourceRedirectDetails(const net::URLRequest* request,
63 int cert_id, 64 int cert_id,
64 const GURL& new_url); 65 const GURL& new_url);
65 virtual ~ResourceRedirectDetails(); 66 virtual ~ResourceRedirectDetails();
66 67
67 // The URL to which we are being redirected. 68 // The URL to which we are being redirected.
68 const GURL& new_url() const { return new_url_; } 69 const GURL& new_url() const { return new_url_; }
69 70
70 private: 71 private:
71 GURL new_url_; 72 GURL new_url_;
72 }; 73 };
73 74
74 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_ 75 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_
OLDNEW
« no previous file with comments | « content/browser/load_from_memory_cache_details.cc ('k') | content/browser/ssl/ssl_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698