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

Side by Side Diff: content/public/common/url_fetcher.h

Issue 9572001: Do cookie checks in NetworkDelegate instead of the URLRequest::Delegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 8 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 | « content/public/browser/resource_request_info.h ('k') | content/test/test_url_fetcher_factory.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CONTENT_PUBLIC_COMMON_URL_FETCHER_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_URL_FETCHER_H_
6 #define CONTENT_PUBLIC_COMMON_URL_FETCHER_H_ 6 #define CONTENT_PUBLIC_COMMON_URL_FETCHER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // This appends the header to the current extra request headers. 149 // This appends the header to the current extra request headers.
150 virtual void AddExtraRequestHeader(const std::string& header_line) = 0; 150 virtual void AddExtraRequestHeader(const std::string& header_line) = 0;
151 151
152 virtual void GetExtraRequestHeaders(net::HttpRequestHeaders* headers) = 0; 152 virtual void GetExtraRequestHeaders(net::HttpRequestHeaders* headers) = 0;
153 153
154 // Set the net::URLRequestContext on the request. Must be called before the 154 // Set the net::URLRequestContext on the request. Must be called before the
155 // request is started. 155 // request is started.
156 virtual void SetRequestContext( 156 virtual void SetRequestContext(
157 net::URLRequestContextGetter* request_context_getter) = 0; 157 net::URLRequestContextGetter* request_context_getter) = 0;
158 158
159 // Mark URLRequests started by the URLFetcher to stem from the given render
160 // view.
161 virtual void AssociateWithRenderView(const GURL& first_party_for_cookies,
162 int render_process_id,
163 int render_view_id) = 0;
164
159 // If |retry| is false, 5xx responses will be propagated to the observer, 165 // If |retry| is false, 5xx responses will be propagated to the observer,
160 // if it is true URLFetcher will automatically re-execute the request, 166 // if it is true URLFetcher will automatically re-execute the request,
161 // after backoff_delay() elapses. URLFetcher has it set to true by default. 167 // after backoff_delay() elapses. URLFetcher has it set to true by default.
162 virtual void SetAutomaticallyRetryOn5xx(bool retry) = 0; 168 virtual void SetAutomaticallyRetryOn5xx(bool retry) = 0;
163 169
164 virtual void SetMaxRetries(int max_retries) = 0; 170 virtual void SetMaxRetries(int max_retries) = 0;
165 virtual int GetMaxRetries() const = 0; 171 virtual int GetMaxRetries() const = 0;
166 172
167 // Returns the back-off delay before the request will be retried, 173 // Returns the back-off delay before the request will be retried,
168 // when a 5xx response was received. 174 // when a 5xx response was received.
(...skipping 16 matching lines...) Expand all
185 191
186 // Returns true if the request was delivered through a proxy. Must only 192 // Returns true if the request was delivered through a proxy. Must only
187 // be called after the OnURLFetchComplete callback has run and the request 193 // be called after the OnURLFetchComplete callback has run and the request
188 // has not failed. 194 // has not failed.
189 virtual bool WasFetchedViaProxy() const = 0; 195 virtual bool WasFetchedViaProxy() const = 0;
190 196
191 // Start the request. After this is called, you may not change any other 197 // Start the request. After this is called, you may not change any other
192 // settings. 198 // settings.
193 virtual void Start() = 0; 199 virtual void Start() = 0;
194 200
195 // Restarts the URLFetcher with a new URLRequestContextGetter.
196 virtual void StartWithRequestContextGetter(
197 net::URLRequestContextGetter* request_context_getter) = 0;
198
199 // Return the URL that we were asked to fetch. 201 // Return the URL that we were asked to fetch.
200 virtual const GURL& GetOriginalURL() const = 0; 202 virtual const GURL& GetOriginalURL() const = 0;
201 203
202 // Return the URL that this fetcher is processing. 204 // Return the URL that this fetcher is processing.
203 virtual const GURL& GetURL() const = 0; 205 virtual const GURL& GetURL() const = 0;
204 206
205 // The status of the URL fetch. 207 // The status of the URL fetch.
206 virtual const net::URLRequestStatus& GetStatus() const = 0; 208 virtual const net::URLRequestStatus& GetStatus() const = 0;
207 209
208 // The http response code received. Will return RESPONSE_CODE_INVALID 210 // The http response code received. Will return RESPONSE_CODE_INVALID
(...skipping 21 matching lines...) Expand all
230 // true, caller takes responsibility for the temp file, and it will not 232 // true, caller takes responsibility for the temp file, and it will not
231 // be removed once the URLFetcher is destroyed. User should not take 233 // be removed once the URLFetcher is destroyed. User should not take
232 // ownership more than once, or call this method after taking ownership. 234 // ownership more than once, or call this method after taking ownership.
233 virtual bool GetResponseAsFilePath(bool take_ownership, 235 virtual bool GetResponseAsFilePath(bool take_ownership,
234 FilePath* out_response_path) const = 0; 236 FilePath* out_response_path) const = 0;
235 }; 237 };
236 238
237 } // namespace content 239 } // namespace content
238 240
239 #endif // CONTENT_PUBLIC_COMMON_URL_FETCHER_H_ 241 #endif // CONTENT_PUBLIC_COMMON_URL_FETCHER_H_
OLDNEW
« no previous file with comments | « content/public/browser/resource_request_info.h ('k') | content/test/test_url_fetcher_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698