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

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

Issue 7995014: Revert 102322 - For the SSL cert status, convert anonymous enum that gives bit values into a type... (Closed) Base URL: svn://svn.chromium.org/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"
17 #include "net/base/host_port_pair.h" 16 #include "net/base/host_port_pair.h"
18 #include "net/url_request/url_request_status.h" 17 #include "net/url_request/url_request_status.h"
19 #include "webkit/glue/resource_type.h" 18 #include "webkit/glue/resource_type.h"
20 19
21 namespace net { 20 namespace net {
22 class URLRequest; 21 class URLRequest;
23 } // namespace net 22 } // namespace net
24 23
25 // Details about a resource request notification. 24 // Details about a resource request notification.
26 class ResourceRequestDetails { 25 class ResourceRequestDetails {
27 public: 26 public:
28 ResourceRequestDetails(const net::URLRequest* request, int cert_id); 27 ResourceRequestDetails(const net::URLRequest* request, int cert_id);
29 28
30 virtual ~ResourceRequestDetails(); 29 virtual ~ResourceRequestDetails();
31 30
32 const GURL& url() const { return url_; } 31 const GURL& url() const { return url_; }
33 const GURL& original_url() const { return original_url_; } 32 const GURL& original_url() const { return original_url_; }
34 const std::string& method() const { return method_; } 33 const std::string& method() const { return method_; }
35 const std::string& referrer() const { return referrer_; } 34 const std::string& referrer() const { return referrer_; }
36 bool has_upload() const { return has_upload_; } 35 bool has_upload() const { return has_upload_; }
37 int load_flags() const { return load_flags_; } 36 int load_flags() const { return load_flags_; }
38 int origin_child_id() const { return origin_child_id_; } 37 int origin_child_id() const { return origin_child_id_; }
39 const net::URLRequestStatus& status() const { return status_; } 38 const net::URLRequestStatus& status() const { return status_; }
40 int ssl_cert_id() const { return ssl_cert_id_; } 39 int ssl_cert_id() const { return ssl_cert_id_; }
41 net::CertStatus ssl_cert_status() const { return ssl_cert_status_; } 40 int ssl_cert_status() const { return ssl_cert_status_; }
42 ResourceType::Type resource_type() const { return resource_type_; } 41 ResourceType::Type resource_type() const { return resource_type_; }
43 net::HostPortPair socket_address() const { return socket_address_; } 42 net::HostPortPair socket_address() const { return socket_address_; }
44 43
45 private: 44 private:
46 GURL url_; 45 GURL url_;
47 GURL original_url_; 46 GURL original_url_;
48 std::string method_; 47 std::string method_;
49 std::string referrer_; 48 std::string referrer_;
50 bool has_upload_; 49 bool has_upload_;
51 int load_flags_; 50 int load_flags_;
52 int origin_child_id_; 51 int origin_child_id_;
53 net::URLRequestStatus status_; 52 net::URLRequestStatus status_;
54 int ssl_cert_id_; 53 int ssl_cert_id_;
55 net::CertStatus ssl_cert_status_; 54 int ssl_cert_status_;
56 ResourceType::Type resource_type_; 55 ResourceType::Type resource_type_;
57 net::HostPortPair socket_address_; 56 net::HostPortPair socket_address_;
58 }; 57 };
59 58
60 // Details about a redirection of a resource request. 59 // Details about a redirection of a resource request.
61 class ResourceRedirectDetails : public ResourceRequestDetails { 60 class ResourceRedirectDetails : public ResourceRequestDetails {
62 public: 61 public:
63 ResourceRedirectDetails(const net::URLRequest* request, 62 ResourceRedirectDetails(const net::URLRequest* request,
64 int cert_id, 63 int cert_id,
65 const GURL& new_url); 64 const GURL& new_url);
66 virtual ~ResourceRedirectDetails(); 65 virtual ~ResourceRedirectDetails();
67 66
68 // The URL to which we are being redirected. 67 // The URL to which we are being redirected.
69 const GURL& new_url() const { return new_url_; } 68 const GURL& new_url() const { return new_url_; }
70 69
71 private: 70 private:
72 GURL new_url_; 71 GURL new_url_;
73 }; 72 };
74 73
75 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_ 74 #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