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 7ac195432c74860c36c0abacb493ce7149c1e68f..64bd2a29ed7af50cef17b8e4c0d8477653a73957 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; |
| @@ -105,6 +106,8 @@ class NET_EXPORT URLFetcher { |
| // |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. |
| + // DEPRECATED: Please use the version with NetworkTrafficAnnotationTag |
| + // below instead. |
|
battre
2017/02/01 03:48:24
Shouldn't we remove comments about this being depr
Ramin Halavati
2017/02/01 10:11:13
Done.
|
| static std::unique_ptr<URLFetcher> Create( |
| const GURL& url, |
| URLFetcher::RequestType request_type, |
| @@ -113,12 +116,35 @@ class NET_EXPORT URLFetcher { |
| // 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. |
| + // DEPRECATED: Please use the version with NetworkTrafficAnnotationTag |
| + // below instead. |
| static std::unique_ptr<URLFetcher> Create( |
| int id, |
| const GURL& url, |
| 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. |
| + // |traffic_annotation| metadata about the network traffic send via this |
| + // URLFetcher. See net::DefineNetworkTrafficAnnotation. |
| + 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. |
| + 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 |