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

Side by Side Diff: net/url_request/url_fetcher.h

Issue 2035293002: Remove URLRequest::GetResponseCookies and URLRequestJob::GetResponseCookies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments rogerta Created 4 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 | « net/url_request/test_url_fetcher_factory.cc ('k') | net/url_request/url_fetcher_core.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 NET_URL_REQUEST_URL_FETCHER_H_ 5 #ifndef NET_URL_REQUEST_URL_FETCHER_H_
6 #define NET_URL_REQUEST_URL_FETCHER_H_ 6 #define NET_URL_REQUEST_URL_FETCHER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 28
29 namespace net { 29 namespace net {
30 class HostPortPair; 30 class HostPortPair;
31 class HttpRequestHeaders; 31 class HttpRequestHeaders;
32 class HttpResponseHeaders; 32 class HttpResponseHeaders;
33 class URLFetcherDelegate; 33 class URLFetcherDelegate;
34 class URLFetcherResponseWriter; 34 class URLFetcherResponseWriter;
35 class URLRequestContextGetter; 35 class URLRequestContextGetter;
36 class URLRequestStatus; 36 class URLRequestStatus;
37 typedef std::vector<std::string> ResponseCookies;
38 37
39 // To use this class, create an instance with the desired URL and a pointer to 38 // To use this class, create an instance with the desired URL and a pointer to
40 // the object to be notified when the URL has been loaded: 39 // the object to be notified when the URL has been loaded:
41 // std::unique_ptr<URLFetcher> fetcher = 40 // std::unique_ptr<URLFetcher> fetcher =
42 // URLFetcher::Create(GURL("http://www.google.com"), 41 // URLFetcher::Create(GURL("http://www.google.com"),
43 // URLFetcher::GET, 42 // URLFetcher::GET,
44 // this); 43 // this);
45 // 44 //
46 // You must also set a request context getter: 45 // You must also set a request context getter:
47 // 46 //
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 // Return the URL that this fetcher is processing. 308 // Return the URL that this fetcher is processing.
310 virtual const GURL& GetURL() const = 0; 309 virtual const GURL& GetURL() const = 0;
311 310
312 // The status of the URL fetch. 311 // The status of the URL fetch.
313 virtual const URLRequestStatus& GetStatus() const = 0; 312 virtual const URLRequestStatus& GetStatus() const = 0;
314 313
315 // The http response code received. Will return RESPONSE_CODE_INVALID 314 // The http response code received. Will return RESPONSE_CODE_INVALID
316 // if an error prevented any response from being received. 315 // if an error prevented any response from being received.
317 virtual int GetResponseCode() const = 0; 316 virtual int GetResponseCode() const = 0;
318 317
319 // Cookies received.
320 virtual const ResponseCookies& GetCookies() const = 0;
321
322 // Reports that the received content was malformed. 318 // Reports that the received content was malformed.
323 virtual void ReceivedContentWasMalformed() = 0; 319 virtual void ReceivedContentWasMalformed() = 0;
324 320
325 // Get the response as a string. Return false if the fetcher was not 321 // Get the response as a string. Return false if the fetcher was not
326 // set to store the response as a string. 322 // set to store the response as a string.
327 virtual bool GetResponseAsString(std::string* out_response_string) const = 0; 323 virtual bool GetResponseAsString(std::string* out_response_string) const = 0;
328 324
329 // Get the path to the file containing the response body. Returns false 325 // Get the path to the file containing the response body. Returns false
330 // if the response body was not saved to a file. If take_ownership is 326 // if the response body was not saved to a file. If take_ownership is
331 // true, caller takes responsibility for the file, and it will not 327 // true, caller takes responsibility for the file, and it will not
332 // be removed once the URLFetcher is destroyed. User should not take 328 // be removed once the URLFetcher is destroyed. User should not take
333 // ownership more than once, or call this method after taking ownership. 329 // ownership more than once, or call this method after taking ownership.
334 virtual bool GetResponseAsFilePath( 330 virtual bool GetResponseAsFilePath(
335 bool take_ownership, 331 bool take_ownership,
336 base::FilePath* out_response_path) const = 0; 332 base::FilePath* out_response_path) const = 0;
337 }; 333 };
338 334
339 } // namespace net 335 } // namespace net
340 336
341 #endif // NET_URL_REQUEST_URL_FETCHER_H_ 337 #endif // NET_URL_REQUEST_URL_FETCHER_H_
OLDNEW
« no previous file with comments | « net/url_request/test_url_fetcher_factory.cc ('k') | net/url_request/url_fetcher_core.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698