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

Side by Side Diff: platform/network/chromium/ResourceRequest.h

Issue 113554: For local review prior to sending to webkit (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/WebCore/
Patch Set: '' Created 11 years, 6 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
« no previous file with comments | « platform/network/ResourceResponseBase.cpp ('k') | no next file » | 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_requestorID(0) 50 , m_requestorID(0)
51 , m_requestorProcessID(0) 51 , m_requestorProcessID(0)
52 , m_appCacheContextID(0)
53 , m_targetType(TargetIsSubResource) 52 , m_targetType(TargetIsSubResource)
54 { 53 {
55 } 54 }
56 55
57 ResourceRequest(const KURL& url, const CString& securityInfo) 56 ResourceRequest(const KURL& url, const CString& securityInfo)
58 : ResourceRequestBase(url, UseProtocolCachePolicy) 57 : ResourceRequestBase(url, UseProtocolCachePolicy)
59 , m_requestorID(0) 58 , m_requestorID(0)
60 , m_requestorProcessID(0) 59 , m_requestorProcessID(0)
61 , m_appCacheContextID(0)
62 , m_targetType(TargetIsSubResource) 60 , m_targetType(TargetIsSubResource)
63 , m_securityInfo(securityInfo) 61 , m_securityInfo(securityInfo)
64 { 62 {
65 } 63 }
66 64
67 ResourceRequest(const KURL& url) 65 ResourceRequest(const KURL& url)
68 : ResourceRequestBase(url, UseProtocolCachePolicy) 66 : ResourceRequestBase(url, UseProtocolCachePolicy)
69 , m_requestorID(0) 67 , m_requestorID(0)
70 , m_requestorProcessID(0) 68 , m_requestorProcessID(0)
71 , m_appCacheContextID(0)
72 , m_targetType(TargetIsSubResource) 69 , m_targetType(TargetIsSubResource)
73 { 70 {
74 } 71 }
75 72
76 ResourceRequest(const KURL& url, const String& referrer, ResourceRequest CachePolicy policy = UseProtocolCachePolicy) 73 ResourceRequest(const KURL& url, const String& referrer, ResourceRequest CachePolicy policy = UseProtocolCachePolicy)
77 : ResourceRequestBase(url, policy) 74 : ResourceRequestBase(url, policy)
78 , m_requestorID(0) 75 , m_requestorID(0)
79 , m_requestorProcessID(0) 76 , m_requestorProcessID(0)
80 , m_appCacheContextID(0)
81 , m_targetType(TargetIsSubResource) 77 , m_targetType(TargetIsSubResource)
82 { 78 {
83 setHTTPReferrer(referrer); 79 setHTTPReferrer(referrer);
84 } 80 }
85 81
86 ResourceRequest() 82 ResourceRequest()
87 : ResourceRequestBase(KURL(), UseProtocolCachePolicy) 83 : ResourceRequestBase(KURL(), UseProtocolCachePolicy)
88 , m_requestorID(0) 84 , m_requestorID(0)
89 , m_requestorProcessID(0) 85 , m_requestorProcessID(0)
90 , m_appCacheContextID(0)
91 , m_targetType(TargetIsSubResource) 86 , m_targetType(TargetIsSubResource)
92 { 87 {
93 } 88 }
94 89
95 // Allows the request to be matched up with its requestor. 90 // Allows the request to be matched up with its requestor.
96 int requestorID() const { return m_requestorID; } 91 int requestorID() const { return m_requestorID; }
97 void setRequestorID(int requestorID) { m_requestorID = requestorID; } 92 void setRequestorID(int requestorID) { m_requestorID = requestorID; }
98 93
99 // What this request is for. 94 // What this request is for.
100 TargetType targetType() const { return m_targetType; } 95 TargetType targetType() const { return m_targetType; }
101 void setTargetType(TargetType type) { m_targetType = type; } 96 void setTargetType(TargetType type) { m_targetType = type; }
102 97
103 // The process id of the process from which this request originated. In 98 // The process id of the process from which this request originated. In
104 // the case of out-of-process plugins, this allows to link back the 99 // the case of out-of-process plugins, this allows to link back the
105 // request to the plugin process (as it is processed through a render 100 // request to the plugin process (as it is processed through a render
106 // view process). 101 // view process).
107 int requestorProcessID() const { return m_requestorProcessID; } 102 int requestorProcessID() const { return m_requestorProcessID; }
108 void setRequestorProcessID(int requestorProcessID) { m_requestorProcessI D = requestorProcessID; } 103 void setRequestorProcessID(int requestorProcessID) { m_requestorProcessI D = requestorProcessID; }
109 104
110 // Allows the request to be matched up with its app cache context.
111 int appCacheContextID() const { return m_appCacheContextID; }
112 void setAppCacheContextID(int id) { m_appCacheContextID = id; }
113
114 // Opaque buffer that describes the security state (including SSL 105 // Opaque buffer that describes the security state (including SSL
115 // connection state) for the resource that should be reported when the 106 // connection state) for the resource that should be reported when the
116 // resource has been loaded. This is used to simulate secure 107 // resource has been loaded. This is used to simulate secure
117 // connection for request (typically when showing error page, so the 108 // connection for request (typically when showing error page, so the
118 // error page has the errors of the page that actually failed). Empty 109 // error page has the errors of the page that actually failed). Empty
119 // string if not a secure connection. 110 // string if not a secure connection.
120 CString securityInfo() const { return m_securityInfo; } 111 CString securityInfo() const { return m_securityInfo; }
121 void setSecurityInfo(const CString& value) { m_securityInfo = value; } 112 void setSecurityInfo(const CString& value) { m_securityInfo = value; }
122 113
123 private: 114 private:
124 friend class ResourceRequestBase; 115 friend class ResourceRequestBase;
125 116
126 void doUpdatePlatformRequest() {} 117 void doUpdatePlatformRequest() {}
127 void doUpdateResourceRequest() {} 118 void doUpdateResourceRequest() {}
128 119
129 int m_requestorID; 120 int m_requestorID;
130 int m_requestorProcessID; 121 int m_requestorProcessID;
131 int m_appCacheContextID;
132 TargetType m_targetType; 122 TargetType m_targetType;
133 CString m_securityInfo; 123 CString m_securityInfo;
134 }; 124 };
135 125
136 } // namespace WebCore 126 } // namespace WebCore
137 127
138 #endif 128 #endif
OLDNEW
« no previous file with comments | « platform/network/ResourceResponseBase.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698