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 bb497cc15388bd1b1a668030d71ae107a82de4bd..4710a88412f9eb53aeeff7fc82351c6dacd99e15 100644 |
| --- a/net/url_request/url_fetcher.h |
| +++ b/net/url_request/url_fetcher.h |
| @@ -15,6 +15,7 @@ |
| #include "base/memory/ref_counted.h" |
| #include "base/supports_user_data.h" |
| #include "net/base/net_export.h" |
| +#include "net/traffic_annotation/network_traffic_annotation.h" |
| #include "net/url_request/url_request.h" |
| class GURL; |
| @@ -116,6 +117,29 @@ class NET_EXPORT URLFetcher { |
| URLFetcher::RequestType request_type, |
| URLFetcherDelegate* d); |
| + // |url| is the URL to send the request to. It must be valid. |
| + // |request_type| is the type of request to make. |
| + // |d| the object that will receive the callback on fetch completion. |
|
battre
2016/10/17 14:58:46
// |traffic_annotation| metadata about the network
Ramin Halavati
2016/10/18 06:57:56
Done.
|
| + // This function is a proposed replacement of original Create function to add |
| + // traffic annotation as a mandatory parameter. |
|
battre
2016/10/17 14:58:46
Delete this sentence.
Ramin Halavati
2016/10/18 06:57:56
Done.
|
| + static std::unique_ptr<URLFetcher> Create( |
| + const GURL& url, |
| + URLFetcher::RequestType request_type, |
| + URLFetcherDelegate* d, |
| + NetworkTrafficAnnotationTag traffic_annotation); |
| + |
| + // Like above, but if there's a URLFetcherFactory registered with the |
| + // implementation it will be used. |id| may be used during testing to identify |
| + // who is creating the URLFetcher. |
| + // This function is a proposed replacement of original Create function to add |
| + // traffic annotation as a mandatory parameter. |
|
battre
2016/10/17 14:58:46
Delete this sentence.
Ramin Halavati
2016/10/18 06:57:56
Done.
|
| + static std::unique_ptr<URLFetcher> Create( |
| + int id, |
| + const GURL& url, |
| + URLFetcher::RequestType request_type, |
| + URLFetcherDelegate* d, |
| + NetworkTrafficAnnotationTag traffic_annotation); |
| + |
| // Cancels all existing URLFetchers. Will notify the URLFetcherDelegates. |
| // Note that any new URLFetchers created while this is running will not be |
| // cancelled. Typically, one would call this in the CleanUp() method of an IO |