Chromium Code Reviews| Index: net/url_request/url_fetcher.h |
| diff --git a/net/url_request/url_fetcher.h b/net/url_request/url_fetcher.h |
| index b5e7e5537cdd3136905c08d047419f0fedc38a1b..d3f55e43e301898cd465d3528e845b46891fb204 100644 |
| --- a/net/url_request/url_fetcher.h |
| +++ b/net/url_request/url_fetcher.h |
| @@ -9,8 +9,10 @@ |
| #include <string> |
| #include <vector> |
| +#include "base/callback_forward.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/platform_file.h" |
| +#include "base/supports_user_data.h" |
| #include "net/base/net_export.h" |
| class FilePath; |
| @@ -75,6 +77,10 @@ class NET_EXPORT URLFetcher { |
| PUT, |
| }; |
| + // Used by SetURLRequestUserData. The callback should make a fresh |
| + // Data* object every time it's called. |
|
wtc
2012/05/21 22:16:48
Nit: perhaps remove the '*' after "Data"? "Data*"
akalin
2012/05/21 22:28:37
Done.
|
| + typedef base::Callback<base::SupportsUserData::Data*()> CreateDataCallback; |
| + |
| virtual ~URLFetcher(); |
| // Sets data only needed by POSTs. All callers making POST requests should |
| @@ -125,6 +131,15 @@ class NET_EXPORT URLFetcher { |
| virtual void SetRequestContext( |
| URLRequestContextGetter* request_context_getter) = 0; |
| + virtual void SetFirstPartyForCookies( |
|
wtc
2012/05/21 22:16:48
Can you copy the comment (or add it) for this meth
akalin
2012/05/21 22:28:37
Done. Also updated URLFetcherCore docs.
|
| + const GURL& first_party_for_cookies) = 0; |
| + |
| + // Whenever a URLRequest object is created, SetUserData() will be |
|
wtc
2012/05/21 22:16:48
Is SetUserData a typo? This method is named SetUR
akalin
2012/05/21 22:28:37
This *is* supposed to be the one-sentence descript
|
| + // called on it with the given key and the result of the given |
| + // callback. |
| + virtual void SetURLRequestUserData( |
| + const void* key, const CreateDataCallback& create_data_callback) = 0; |
| + |
| // If |retry| is false, 5xx responses will be propagated to the observer, |
| // if it is true URLFetcher will automatically re-execute the request, |
| // after backoff_delay() elapses. URLFetcher has it set to true by default. |