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

Unified Diff: net/url_request/url_fetcher_core.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/url_fetcher_core.h ('k') | net/url_request/url_fetcher_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_fetcher_core.cc
diff --git a/net/url_request/url_fetcher_core.cc b/net/url_request/url_fetcher_core.cc
index 98edef63c8e3a70b7e7d7ec32f894caf54be1bf7..a4727c7cb4f0b8e659b5cc3f28796be74ffb1598 100644
--- a/net/url_request/url_fetcher_core.cc
+++ b/net/url_request/url_fetcher_core.cc
@@ -71,10 +71,12 @@ void URLFetcherCore::Registry::CancelAll() {
base::LazyInstance<URLFetcherCore::Registry>::DestructorAtExit
URLFetcherCore::g_registry = LAZY_INSTANCE_INITIALIZER;
-URLFetcherCore::URLFetcherCore(URLFetcher* fetcher,
- const GURL& original_url,
- URLFetcher::RequestType request_type,
- URLFetcherDelegate* d)
+URLFetcherCore::URLFetcherCore(
+ URLFetcher* fetcher,
+ const GURL& original_url,
+ URLFetcher::RequestType request_type,
+ URLFetcherDelegate* d,
+ net::NetworkTrafficAnnotationTag traffic_annotation)
: fetcher_(fetcher),
original_url_(original_url),
request_type_(request_type),
@@ -103,7 +105,8 @@ URLFetcherCore::URLFetcherCore(URLFetcher* fetcher,
max_retries_on_network_changes_(0),
current_upload_bytes_(-1),
current_response_bytes_(0),
- total_response_bytes_(-1) {
+ total_response_bytes_(-1),
+ traffic_annotation_(traffic_annotation) {
CHECK(original_url_.is_valid());
}
@@ -552,7 +555,7 @@ void URLFetcherCore::StartURLRequest() {
current_response_bytes_ = 0;
request_context_getter_->AddObserver(this);
request_ = request_context_getter_->GetURLRequestContext()->CreateRequest(
- original_url_, DEFAULT_PRIORITY, this);
+ original_url_, DEFAULT_PRIORITY, this, traffic_annotation_);
int flags = request_->load_flags() | load_flags_;
// TODO(mmenke): This should really be with the other code to set the upload
« no previous file with comments | « net/url_request/url_fetcher_core.h ('k') | net/url_request/url_fetcher_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698