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

Side by Side Diff: third_party/WebKit/WebCore/platform/network/chromium/ResourceRequest.h

Issue 46026: Get rid of stashing a frame pointer with ResourceRequest and just store the r... (Closed) Base URL: svn://chrome-svn/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
« no previous file with comments | « chrome/renderer/renderer_glue.cc ('k') | webkit/glue/resource_fetcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
4 * Copyright (C) 2008 Google, Inc. 4 * Copyright (C) 2008 Google, Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 29 matching lines...) Expand all
40 enum TargetType { 40 enum TargetType {
41 TargetIsMainFrame, 41 TargetIsMainFrame,
42 TargetIsSubFrame, 42 TargetIsSubFrame,
43 TargetIsSubResource, 43 TargetIsSubResource,
44 TargetIsObject, 44 TargetIsObject,
45 TargetIsMedia 45 TargetIsMedia
46 }; 46 };
47 47
48 ResourceRequest(const String& url) 48 ResourceRequest(const String& url)
49 : ResourceRequestBase(KURL(url), UseProtocolCachePolicy) 49 : ResourceRequestBase(KURL(url), UseProtocolCachePolicy)
50 , m_frame(0) 50 , m_requestorID(0)
51 , m_originPid(0) 51 , m_requestorProcessID(0)
52 , m_targetType(TargetIsSubResource) 52 , m_targetType(TargetIsSubResource)
53 { 53 {
54 } 54 }
55 55
56 ResourceRequest(const KURL& url, const CString& securityInfo) 56 ResourceRequest(const KURL& url, const CString& securityInfo)
57 : ResourceRequestBase(url, UseProtocolCachePolicy) 57 : ResourceRequestBase(url, UseProtocolCachePolicy)
58 , m_frame(0) 58 , m_requestorID(0)
59 , m_originPid(0) 59 , m_requestorProcessID(0)
60 , m_targetType(TargetIsSubResource) 60 , m_targetType(TargetIsSubResource)
61 , m_securityInfo(securityInfo) 61 , m_securityInfo(securityInfo)
62 { 62 {
63 } 63 }
64 64
65 ResourceRequest(const KURL& url) 65 ResourceRequest(const KURL& url)
66 : ResourceRequestBase(url, UseProtocolCachePolicy) 66 : ResourceRequestBase(url, UseProtocolCachePolicy)
67 , m_frame(0) 67 , m_requestorID(0)
68 , m_originPid(0) 68 , m_requestorProcessID(0)
69 , m_targetType(TargetIsSubResource) 69 , m_targetType(TargetIsSubResource)
70 { 70 {
71 } 71 }
72 72
73 ResourceRequest(const KURL& url, const String& referrer, ResourceRequest CachePolicy policy = UseProtocolCachePolicy) 73 ResourceRequest(const KURL& url, const String& referrer, ResourceRequest CachePolicy policy = UseProtocolCachePolicy)
74 : ResourceRequestBase(url, policy) 74 : ResourceRequestBase(url, policy)
75 , m_frame(0) 75 , m_requestorID(0)
76 , m_originPid(0) 76 , m_requestorProcessID(0)
77 , m_targetType(TargetIsSubResource) 77 , m_targetType(TargetIsSubResource)
78 { 78 {
79 setHTTPReferrer(referrer); 79 setHTTPReferrer(referrer);
80 } 80 }
81 81
82 ResourceRequest() 82 ResourceRequest()
83 : ResourceRequestBase(KURL(), UseProtocolCachePolicy) 83 : ResourceRequestBase(KURL(), UseProtocolCachePolicy)
84 , m_frame(0) 84 , m_requestorID(0)
85 , m_originPid(0) 85 , m_requestorProcessID(0)
86 , m_targetType(TargetIsSubResource) 86 , m_targetType(TargetIsSubResource)
87 { 87 {
88 } 88 }
89 89
90 // Provides context for the resource request. 90 // Allows the request to be matched up with its requestor.
91 Frame* frame() const { return m_frame; } 91 int requestorID() const { return m_requestorID; }
92 void setFrame(Frame* frame) { m_frame = frame; } 92 void setRequestorID(int requestorID) { m_requestorID = requestorID; }
93 93
94 // What this request is for. 94 // What this request is for.
95 TargetType targetType() const { return m_targetType; }
95 void setTargetType(TargetType type) { m_targetType = type; } 96 void setTargetType(TargetType type) { m_targetType = type; }
96 TargetType targetType() const { return m_targetType; } 97
97 98 // The document's policy base url.
98 // The origin pid is the process id of the process from which this 99 KURL policyURL() const { return m_policyURL; }
99 // request originated. In the case of out-of-process plugins, this 100 void setPolicyURL(const KURL& policyURL) { m_policyURL = policyURL; }
100 // allows to link back the request to the plugin process (as it is 101
101 // processed through a render view process). 102 // The process id of the process from which this request originated. In
102 int originPid() const { return m_originPid; } 103 // the case of out-of-process plugins, this allows to link back the
103 void setOriginPid(int originPid) { m_originPid = originPid; } 104 // request to the plugin process (as it is processed through a render
105 // view process).
106 int requestorProcessID() const { return m_requestorProcessID; }
107 void setRequestorProcessID(int requestorProcessID) { m_requestorProcessI D = requestorProcessID; }
104 108
105 // Opaque buffer that describes the security state (including SSL 109 // Opaque buffer that describes the security state (including SSL
106 // connection state) for the resource that should be reported when the 110 // connection state) for the resource that should be reported when the
107 // resource has been loaded. This is used to simulate secure 111 // resource has been loaded. This is used to simulate secure
108 // connection for request (typically when showing error page, so the 112 // connection for request (typically when showing error page, so the
109 // error page has the errors of the page that actually failed). Empty 113 // error page has the errors of the page that actually failed). Empty
110 // string if not a secure connection. 114 // string if not a secure connection.
111 CString securityInfo() const { return m_securityInfo; } 115 CString securityInfo() const { return m_securityInfo; }
112 void setSecurityInfo(const CString& value) { m_securityInfo = value; } 116 void setSecurityInfo(const CString& value) { m_securityInfo = value; }
113 117
114 private: 118 private:
115 friend class ResourceRequestBase; 119 friend class ResourceRequestBase;
116 120
117 void doUpdatePlatformRequest() {} 121 void doUpdatePlatformRequest() {}
118 void doUpdateResourceRequest() {} 122 void doUpdateResourceRequest() {}
119 123
120 Frame* m_frame; 124 int m_requestorID;
121 int m_originPid; 125 int m_requestorProcessID;
122 TargetType m_targetType; 126 TargetType m_targetType;
123 CString m_securityInfo; 127 CString m_securityInfo;
128 KURL m_policyURL;
124 }; 129 };
125 130
126 } // namespace WebCore 131 } // namespace WebCore
127 132
128 #endif 133 #endif
OLDNEW
« no previous file with comments | « chrome/renderer/renderer_glue.cc ('k') | webkit/glue/resource_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698