| 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..eb4663db76386afab836aed991c359d8125e4049 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.
|
| + // This function should not be used in Chromium, please use the version with
|
| + // NetworkTrafficAnnotationTag below instead.
|
| static std::unique_ptr<URLFetcher> Create(
|
| const GURL& url,
|
| URLFetcher::RequestType request_type,
|
| @@ -113,12 +116,41 @@ 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.
|
| + // This function should not be used in Chromium, 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. Note that:
|
| + // - net provides the API for tagging requests with an opaque identifier.
|
| + // - tools/traffic_annotation/traffic_annotation.proto contains the Chrome
|
| + // specific .proto describing the verbose annotation format that Chrome's
|
| + // callsites are expected to follow.
|
| + // - tools/traffic_annotation/ contains sample and template for annotation and
|
| + // tools will be added for verification following crbug.com/690323.
|
| + 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
|
|
|