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

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

Issue 48038: SSL Fix: Step 3.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_
(...skipping 24 matching lines...) Expand all
35 has_upload_(request->has_upload()), 35 has_upload_(request->has_upload()),
36 load_flags_(request->load_flags()), 36 load_flags_(request->load_flags()),
37 origin_pid_(request->origin_pid()), 37 origin_pid_(request->origin_pid()),
38 status_(request->status()), 38 status_(request->status()),
39 ssl_cert_id_(cert_id), 39 ssl_cert_id_(cert_id),
40 ssl_cert_status_(request->ssl_info().cert_status) { 40 ssl_cert_status_(request->ssl_info().cert_status) {
41 const ResourceDispatcherHost::ExtraRequestInfo* info = 41 const ResourceDispatcherHost::ExtraRequestInfo* info =
42 ResourceDispatcherHost::ExtraInfoForRequest(request); 42 ResourceDispatcherHost::ExtraInfoForRequest(request);
43 DCHECK(info); 43 DCHECK(info);
44 resource_type_ = info->resource_type; 44 resource_type_ = info->resource_type;
45 frame_origin_ = info->frame_origin;
46 main_frame_origin_ = info->main_frame_origin;
45 } 47 }
46 48
47 ~ResourceRequestDetails() { } 49 ~ResourceRequestDetails() { }
48 50
49 const GURL& url() const { return url_; } 51 const GURL& url() const { return url_; }
50 const GURL& original_url() const { return original_url_; } 52 const GURL& original_url() const { return original_url_; }
51 const std::string& method() const { return method_; } 53 const std::string& method() const { return method_; }
52 const std::string& referrer() const { return referrer_; } 54 const std::string& referrer() const { return referrer_; }
55 const std::string& frame_origin() const { return frame_origin_; }
56 const std::string& main_frame_origin() const { return main_frame_origin_; }
53 bool has_upload() const { return has_upload_; } 57 bool has_upload() const { return has_upload_; }
54 int load_flags() const { return load_flags_; } 58 int load_flags() const { return load_flags_; }
55 int origin_pid() const { return origin_pid_; } 59 int origin_pid() const { return origin_pid_; }
56 const URLRequestStatus& status() const { return status_; } 60 const URLRequestStatus& status() const { return status_; }
57 int ssl_cert_id() const { return ssl_cert_id_; } 61 int ssl_cert_id() const { return ssl_cert_id_; }
58 int ssl_cert_status() const { return ssl_cert_status_; } 62 int ssl_cert_status() const { return ssl_cert_status_; }
59 ResourceType::Type resource_type() const { return resource_type_; } 63 ResourceType::Type resource_type() const { return resource_type_; }
64
60 private: 65 private:
61 GURL url_; 66 GURL url_;
62 GURL original_url_; 67 GURL original_url_;
63 std::string method_; 68 std::string method_;
64 std::string referrer_; 69 std::string referrer_;
70 std::string frame_origin_;
71 std::string main_frame_origin_;
65 bool has_upload_; 72 bool has_upload_;
66 int load_flags_; 73 int load_flags_;
67 int origin_pid_; 74 int origin_pid_;
68 URLRequestStatus status_; 75 URLRequestStatus status_;
69 int ssl_cert_id_; 76 int ssl_cert_id_;
70 int ssl_cert_status_; 77 int ssl_cert_status_;
71 ResourceType::Type resource_type_; 78 ResourceType::Type resource_type_;
72 79
73 DISALLOW_COPY_AND_ASSIGN(ResourceRequestDetails); 80 DISALLOW_COPY_AND_ASSIGN(ResourceRequestDetails);
74 }; 81 };
75 82
76 // Details about a redirection of a resource request. 83 // Details about a redirection of a resource request.
77 class ResourceRedirectDetails : public ResourceRequestDetails { 84 class ResourceRedirectDetails : public ResourceRequestDetails {
78 public: 85 public:
79 ResourceRedirectDetails(const URLRequest* request, 86 ResourceRedirectDetails(const URLRequest* request,
80 int cert_id, 87 int cert_id,
81 const GURL& new_url) 88 const GURL& new_url)
82 : ResourceRequestDetails(request, cert_id), 89 : ResourceRequestDetails(request, cert_id),
83 new_url_(new_url) { } 90 new_url_(new_url) { }
84 91
85 // The URL to which we are being redirected. 92 // The URL to which we are being redirected.
86 const GURL& new_url() const { return new_url_; } 93 const GURL& new_url() const { return new_url_; }
87 94
88 private: 95 private:
89 GURL new_url_; 96 GURL new_url_;
90 }; 97 };
91 98
92 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_ 99 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc ('k') | chrome/browser/ssl/ssl_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698