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 // 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 URLRequest, but exists on the UI thread. | 7 // of URLRequest, but exists on the UI thread. |
8 | 8 |
9 #ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_ | 9 #ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_ |
10 #define CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_ | 10 #define CHROME_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 "chrome/browser/cert_store.h" | 15 #include "chrome/browser/cert_store.h" |
16 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 16 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
17 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" | 17 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" |
18 #include "chrome/browser/worker_host/worker_service.h" | 18 #include "chrome/browser/worker_host/worker_service.h" |
19 #include "googleurl/src/gurl.h" | 19 #include "googleurl/src/gurl.h" |
20 #include "net/url_request/url_request_status.h" | 20 #include "net/url_request/url_request_status.h" |
21 | 21 |
| 22 namespace net { |
22 class URLRequest; | 23 class URLRequest; |
| 24 } // namespace net |
23 | 25 |
24 // Details about a resource request notification. | 26 // Details about a resource request notification. |
25 class ResourceRequestDetails { | 27 class ResourceRequestDetails { |
26 public: | 28 public: |
27 ResourceRequestDetails(const URLRequest* request, int cert_id); | 29 ResourceRequestDetails(const net::URLRequest* request, int cert_id); |
28 | 30 |
29 virtual ~ResourceRequestDetails(); | 31 virtual ~ResourceRequestDetails(); |
30 | 32 |
31 const GURL& url() const { return url_; } | 33 const GURL& url() const { return url_; } |
32 const GURL& original_url() const { return original_url_; } | 34 const GURL& original_url() const { return original_url_; } |
33 const std::string& method() const { return method_; } | 35 const std::string& method() const { return method_; } |
34 const std::string& referrer() const { return referrer_; } | 36 const std::string& referrer() const { return referrer_; } |
35 const std::string& frame_origin() const { return frame_origin_; } | 37 const std::string& frame_origin() const { return frame_origin_; } |
36 const std::string& main_frame_origin() const { return main_frame_origin_; } | 38 const std::string& main_frame_origin() const { return main_frame_origin_; } |
37 bool has_upload() const { return has_upload_; } | 39 bool has_upload() const { return has_upload_; } |
(...skipping 16 matching lines...) Expand all Loading... |
54 int origin_child_id_; | 56 int origin_child_id_; |
55 URLRequestStatus status_; | 57 URLRequestStatus status_; |
56 int ssl_cert_id_; | 58 int ssl_cert_id_; |
57 int ssl_cert_status_; | 59 int ssl_cert_status_; |
58 ResourceType::Type resource_type_; | 60 ResourceType::Type resource_type_; |
59 }; | 61 }; |
60 | 62 |
61 // Details about a redirection of a resource request. | 63 // Details about a redirection of a resource request. |
62 class ResourceRedirectDetails : public ResourceRequestDetails { | 64 class ResourceRedirectDetails : public ResourceRequestDetails { |
63 public: | 65 public: |
64 ResourceRedirectDetails(const URLRequest* request, | 66 ResourceRedirectDetails(const net::URLRequest* request, |
65 int cert_id, | 67 int cert_id, |
66 const GURL& new_url); | 68 const GURL& new_url); |
67 virtual ~ResourceRedirectDetails(); | 69 virtual ~ResourceRedirectDetails(); |
68 | 70 |
69 // The URL to which we are being redirected. | 71 // The URL to which we are being redirected. |
70 const GURL& new_url() const { return new_url_; } | 72 const GURL& new_url() const { return new_url_; } |
71 | 73 |
72 private: | 74 private: |
73 GURL new_url_; | 75 GURL new_url_; |
74 }; | 76 }; |
75 | 77 |
76 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_ | 78 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_ |
OLD | NEW |