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

Side by Side Diff: net/url_request/url_request_context.cc

Issue 2421333002: Protobuf for Traffic Annotation and first use by a URLFetcher. (Closed)
Patch Set: More comments added. Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « net/url_request/url_request_context.h ('k') | tools/traffic_annotation/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/url_request/url_request_context.h" 5 #include "net/url_request/url_request_context.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/debug/alias.h" 8 #include "base/debug/alias.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 std::unique_ptr<URLRequest> URLRequestContext::CreateRequest( 96 std::unique_ptr<URLRequest> URLRequestContext::CreateRequest(
97 const GURL& url, 97 const GURL& url,
98 RequestPriority priority, 98 RequestPriority priority,
99 URLRequest::Delegate* delegate) const { 99 URLRequest::Delegate* delegate) const {
100 return base::WrapUnique( 100 return base::WrapUnique(
101 new URLRequest(url, priority, delegate, this, network_delegate_)); 101 new URLRequest(url, priority, delegate, this, network_delegate_));
102 } 102 }
103 103
104 std::unique_ptr<URLRequest> URLRequestContext::CreateRequest(
105 const GURL& url,
106 RequestPriority priority,
107 URLRequest::Delegate* delegate,
108 NetworkTrafficAnnotationTag traffic_annotation) const {
109 // |traffic_annotation| is just a tag that is extracted during static
110 // code analysis and can be ignored here.
111 return CreateRequest(url, priority, delegate);
112 }
113
104 void URLRequestContext::set_cookie_store(CookieStore* cookie_store) { 114 void URLRequestContext::set_cookie_store(CookieStore* cookie_store) {
105 cookie_store_ = cookie_store; 115 cookie_store_ = cookie_store;
106 } 116 }
107 117
108 void URLRequestContext::AssertNoURLRequests() const { 118 void URLRequestContext::AssertNoURLRequests() const {
109 int num_requests = url_requests_->size(); 119 int num_requests = url_requests_->size();
110 if (num_requests != 0) { 120 if (num_requests != 0) {
111 // We're leaking URLRequests :( Dump the URL of the first one and record how 121 // We're leaking URLRequests :( Dump the URL of the first one and record how
112 // many we leaked so we have an idea of how bad it is. 122 // many we leaked so we have an idea of how bad it is.
113 char url_buf[128]; 123 char url_buf[128];
(...skipping 24 matching lines...) Expand all
138 if (network_session) 148 if (network_session)
139 network_session->DumpMemoryStats(pmd, dump->absolute_name()); 149 network_session->DumpMemoryStats(pmd, dump->absolute_name());
140 } 150 }
141 SSLClientSocketImpl::DumpSSLClientSessionMemoryStats(pmd); 151 SSLClientSocketImpl::DumpSSLClientSessionMemoryStats(pmd);
142 if (sdch_manager_) 152 if (sdch_manager_)
143 sdch_manager_->DumpMemoryStats(pmd, dump->absolute_name()); 153 sdch_manager_->DumpMemoryStats(pmd, dump->absolute_name());
144 return true; 154 return true;
145 } 155 }
146 156
147 } // namespace net 157 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_context.h ('k') | tools/traffic_annotation/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698