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

Unified Diff: net/url_request/url_fetcher.cc

Issue 2846873002: Network traffic annotation added to URLFetcher. (Closed)
Patch Set: Unnecessary const(s) removed. Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/test_url_fetcher_factory.cc ('k') | net/url_request/url_fetcher_core.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_fetcher.cc
diff --git a/net/url_request/url_fetcher.cc b/net/url_request/url_fetcher.cc
index a6ed109c716a1bcd8afcb7856961589d65f7925c..6f020a89d01471c9834dbc570b7216c04a9e31f0 100644
--- a/net/url_request/url_fetcher.cc
+++ b/net/url_request/url_fetcher.cc
@@ -25,10 +25,7 @@ std::unique_ptr<URLFetcher> URLFetcher::Create(
const GURL& url,
URLFetcher::RequestType request_type,
URLFetcherDelegate* d) {
- URLFetcherFactory* factory = URLFetcherImpl::factory();
- return factory ? factory->CreateURLFetcher(id, url, request_type, d)
- : std::unique_ptr<URLFetcher>(
- new URLFetcherImpl(url, request_type, d));
+ return Create(id, url, request_type, d, NO_TRAFFIC_ANNOTATION_YET);
}
// static
@@ -47,9 +44,10 @@ std::unique_ptr<URLFetcher> URLFetcher::Create(
URLFetcher::RequestType request_type,
URLFetcherDelegate* d,
NetworkTrafficAnnotationTag traffic_annotation) {
- // traffic_annotation is just a tag that is extracted during static
- // code analysis and can be ignored here.
- return Create(id, url, request_type, d);
+ URLFetcherFactory* factory = URLFetcherImpl::factory();
+ return factory ? factory->CreateURLFetcher(id, url, request_type, d)
+ : std::unique_ptr<URLFetcher>(new URLFetcherImpl(
+ url, request_type, d, traffic_annotation));
}
// static
« no previous file with comments | « net/url_request/test_url_fetcher_factory.cc ('k') | net/url_request/url_fetcher_core.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698