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

Side by Side Diff: webkit/glue/resource_loader_bridge.h

Issue 405011: Use an explicit boolean has_new_first_party_for_cookies instead... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Upload before checkin Created 11 years, 1 month 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 | « webkit/glue/media/simple_data_source.cc ('k') | webkit/glue/weburlloader_impl.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 // 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 intent of this file is to provide a type-neutral abstraction between 5 // The intent of this file is to provide a type-neutral abstraction between
6 // Chrome and WebKit for resource loading. This pure-virtual interface is 6 // Chrome and WebKit for resource loading. This pure-virtual interface is
7 // implemented by the embedder, which also provides a factory method Create 7 // implemented by the embedder, which also provides a factory method Create
8 // to instantiate this object. 8 // to instantiate this object.
9 // 9 //
10 // One of these objects will be created by WebKit for each request. WebKit 10 // One of these objects will be created by WebKit for each request. WebKit
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 public: 103 public:
104 virtual ~Peer() {} 104 virtual ~Peer() {}
105 105
106 // Called as upload progress is made. 106 // Called as upload progress is made.
107 // note: only for requests with LOAD_ENABLE_UPLOAD_PROGRESS set 107 // note: only for requests with LOAD_ENABLE_UPLOAD_PROGRESS set
108 virtual void OnUploadProgress(uint64 position, uint64 size) = 0; 108 virtual void OnUploadProgress(uint64 position, uint64 size) = 0;
109 109
110 // Called when a redirect occurs. The implementation may return false to 110 // Called when a redirect occurs. The implementation may return false to
111 // suppress the redirect. The given ResponseInfo provides complete 111 // suppress the redirect. The given ResponseInfo provides complete
112 // information about the redirect, and new_url is the URL that will be 112 // information about the redirect, and new_url is the URL that will be
113 // loaded if this method returns true. If this method returns true, it 113 // loaded if this method returns true. If this method returns true, the
114 // stores in *new_first_party_for_cookies the new URL that should be 114 // output parameter *has_new_first_party_for_cookies indicates whether the
115 // consulted for the third-party cookie blocking policy. If the cookie 115 // output parameter *new_first_party_for_cookies contains the new URL that
116 // policy URL doesn't need changing, it stores an empty, invalid URL in 116 // should be consulted for the third-party cookie blocking policy.
117 // *new_first_party_for_cookies.
118 virtual bool OnReceivedRedirect(const GURL& new_url, 117 virtual bool OnReceivedRedirect(const GURL& new_url,
119 const ResponseInfo& info, 118 const ResponseInfo& info,
119 bool* has_new_first_party_for_cookies,
120 GURL* new_first_party_for_cookies) = 0; 120 GURL* new_first_party_for_cookies) = 0;
121 121
122 // Called when response headers are available (after all redirects have 122 // Called when response headers are available (after all redirects have
123 // been followed). |content_filtered| is set to true if the contents is 123 // been followed). |content_filtered| is set to true if the contents is
124 // altered or replaced (usually for security reasons when the resource is 124 // altered or replaced (usually for security reasons when the resource is
125 // deemed unsafe). 125 // deemed unsafe).
126 virtual void OnReceivedResponse(const ResponseInfo& info, 126 virtual void OnReceivedResponse(const ResponseInfo& info,
127 bool content_filtered) = 0; 127 bool content_filtered) = 0;
128 128
129 // Called when a chunk of response data is available. This method may 129 // Called when a chunk of response data is available. This method may
(...skipping 21 matching lines...) Expand all
151 // must be encoded. 151 // must be encoded.
152 // 152 //
153 // For HTTP(S) POST requests, the AppendDataToUpload and AppendFileToUpload 153 // For HTTP(S) POST requests, the AppendDataToUpload and AppendFileToUpload
154 // methods may be called to construct the body of the request. 154 // methods may be called to construct the body of the request.
155 // 155 //
156 // For HTTP(S) requests, the headers parameter can be a \r\n-delimited and 156 // For HTTP(S) requests, the headers parameter can be a \r\n-delimited and
157 // \r\n-terminated list of MIME headers. They should be ASCII-encoded using 157 // \r\n-terminated list of MIME headers. They should be ASCII-encoded using
158 // the standard MIME header encoding rules. The headers parameter can also 158 // the standard MIME header encoding rules. The headers parameter can also
159 // be null if no extra request headers need to be set. 159 // be null if no extra request headers need to be set.
160 // 160 //
161 // policy_url is the URL of the document in the top-level window, which may be 161 // first_party_for_cookies is the URL of the document in the top-level
162 // checked by the third-party cookie blocking policy. 162 // window, which may be checked by the third-party cookie blocking policy.
163 // 163 //
164 // load_flags is composed of the values defined in url_request_load_flags.h 164 // load_flags is composed of the values defined in url_request_load_flags.h
165 // 165 //
166 // request_type indicates if the current request is the main frame load, a 166 // request_type indicates if the current request is the main frame load, a
167 // sub-frame load, or a sub objects load. 167 // sub-frame load, or a sub objects load.
168 // 168 //
169 // appcache_host_id identifies that appcache host this request is 169 // appcache_host_id identifies that appcache host this request is
170 // associated with. 170 // associated with.
171 // 171 //
172 // routing_id passed to this function allows it to be associated with a 172 // routing_id passed to this function allows it to be associated with a
173 // frame's network context. 173 // frame's network context.
174 static ResourceLoaderBridge* Create(const std::string& method, 174 static ResourceLoaderBridge* Create(const std::string& method,
175 const GURL& url, 175 const GURL& url,
176 const GURL& policy_url, 176 const GURL& first_party_for_cookies,
177 const GURL& referrer, 177 const GURL& referrer,
178 const std::string& frame_origin, 178 const std::string& frame_origin,
179 const std::string& main_frame_origin, 179 const std::string& main_frame_origin,
180 const std::string& headers, 180 const std::string& headers,
181 int load_flags, 181 int load_flags,
182 int requestor_pid, 182 int requestor_pid,
183 ResourceType::Type request_type, 183 ResourceType::Type request_type,
184 int appcache_host_id, 184 int appcache_host_id,
185 int routing_id); 185 int routing_id);
186 186
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 // construction must go through Create() 231 // construction must go through Create()
232 ResourceLoaderBridge(); 232 ResourceLoaderBridge();
233 233
234 private: 234 private:
235 DISALLOW_EVIL_CONSTRUCTORS(ResourceLoaderBridge); 235 DISALLOW_EVIL_CONSTRUCTORS(ResourceLoaderBridge);
236 }; 236 };
237 237
238 } // namespace webkit_glue 238 } // namespace webkit_glue
239 239
240 #endif // WEBKIT_GLUE_RESOURCE_LOADER_BRIDGE_H_ 240 #endif // WEBKIT_GLUE_RESOURCE_LOADER_BRIDGE_H_
OLDNEW
« no previous file with comments | « webkit/glue/media/simple_data_source.cc ('k') | webkit/glue/weburlloader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698