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

Side by Side Diff: net/url_request/url_request.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/url_fetcher_impl_unittest.cc ('k') | net/url_request/url_request.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) 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_REQUEST_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_H_
6 #define NET_URL_REQUEST_URL_REQUEST_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 struct LoadTimingInfo; 52 struct LoadTimingInfo;
53 struct RedirectInfo; 53 struct RedirectInfo;
54 class SSLCertRequestInfo; 54 class SSLCertRequestInfo;
55 class SSLInfo; 55 class SSLInfo;
56 class SSLPrivateKey; 56 class SSLPrivateKey;
57 class UploadDataStream; 57 class UploadDataStream;
58 class URLRequestContext; 58 class URLRequestContext;
59 class URLRequestJob; 59 class URLRequestJob;
60 class X509Certificate; 60 class X509Certificate;
61 61
62 // This stores the values of the Set-Cookie headers received during the request.
63 // Each item in the vector corresponds to a Set-Cookie: line received,
64 // excluding the "Set-Cookie:" part.
65 typedef std::vector<std::string> ResponseCookies;
66
67 //----------------------------------------------------------------------------- 62 //-----------------------------------------------------------------------------
68 // A class representing the asynchronous load of a data stream from an URL. 63 // A class representing the asynchronous load of a data stream from an URL.
69 // 64 //
70 // The lifetime of an instance of this class is completely controlled by the 65 // The lifetime of an instance of this class is completely controlled by the
71 // consumer, and the instance is not required to live on the heap or be 66 // consumer, and the instance is not required to live on the heap or be
72 // allocated in any special way. It is also valid to delete an URLRequest 67 // allocated in any special way. It is also valid to delete an URLRequest
73 // object during the handling of a callback to its delegate. Of course, once 68 // object during the handling of a callback to its delegate. Of course, once
74 // the URLRequest is deleted, no further callbacks to its delegate will occur. 69 // the URLRequest is deleted, no further callbacks to its delegate will occur.
75 // 70 //
76 // NOTE: All usage of all instances of this class should be on the same thread. 71 // NOTE: All usage of all instances of this class should be on the same thread.
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 // 481 //
487 // Note that GetSocketAddress returns the |socket_address| field from 482 // Note that GetSocketAddress returns the |socket_address| field from
488 // HttpResponseInfo, which is only populated once the response headers are 483 // HttpResponseInfo, which is only populated once the response headers are
489 // received, and can return cached values for cache revalidation requests. 484 // received, and can return cached values for cache revalidation requests.
490 // GetRemoteEndpoint will only return addresses from the current request. 485 // GetRemoteEndpoint will only return addresses from the current request.
491 // 486 //
492 // Returns true and fills in |endpoint| if the endpoint is available; returns 487 // Returns true and fills in |endpoint| if the endpoint is available; returns
493 // false and leaves |endpoint| unchanged if it is unavailable. 488 // false and leaves |endpoint| unchanged if it is unavailable.
494 bool GetRemoteEndpoint(IPEndPoint* endpoint) const; 489 bool GetRemoteEndpoint(IPEndPoint* endpoint) const;
495 490
496 // Returns the cookie values included in the response, if the request is one
497 // that can have cookies. Returns true if the request is a cookie-bearing
498 // type, false otherwise. This method may only be called once the
499 // delegate's OnResponseStarted method has been called.
500 bool GetResponseCookies(ResponseCookies* cookies);
501
502 // Get the mime type. This method may only be called once the delegate's 491 // Get the mime type. This method may only be called once the delegate's
503 // OnResponseStarted method has been called. 492 // OnResponseStarted method has been called.
504 void GetMimeType(std::string* mime_type) const; 493 void GetMimeType(std::string* mime_type) const;
505 494
506 // Get the charset (character encoding). This method may only be called once 495 // Get the charset (character encoding). This method may only be called once
507 // the delegate's OnResponseStarted method has been called. 496 // the delegate's OnResponseStarted method has been called.
508 void GetCharset(std::string* charset) const; 497 void GetCharset(std::string* charset) const;
509 498
510 // Returns the HTTP response code (e.g., 200, 404, and so on). This method 499 // Returns the HTTP response code (e.g., 200, 404, and so on). This method
511 // may only be called once the delegate's OnResponseStarted method has been 500 // may only be called once the delegate's OnResponseStarted method has been
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 854
866 // The proxy server used for this request, if any. 855 // The proxy server used for this request, if any.
867 HostPortPair proxy_server_; 856 HostPortPair proxy_server_;
868 857
869 DISALLOW_COPY_AND_ASSIGN(URLRequest); 858 DISALLOW_COPY_AND_ASSIGN(URLRequest);
870 }; 859 };
871 860
872 } // namespace net 861 } // namespace net
873 862
874 #endif // NET_URL_REQUEST_URL_REQUEST_H_ 863 #endif // NET_URL_REQUEST_URL_REQUEST_H_
OLDNEW
« no previous file with comments | « net/url_request/url_fetcher_impl_unittest.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698