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

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

Issue 2907463002: Split HttpNetworkSession::Params into two structs. (Closed)
Patch Set: Response to comments Created 3 years, 6 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') | net/url_request/url_request_context_builder.h » ('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 <inttypes.h> 7 #include <inttypes.h>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/debug/alias.h" 10 #include "base/debug/alias.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 ) const { 94 ) const {
95 HttpTransactionFactory* transaction_factory = http_transaction_factory(); 95 HttpTransactionFactory* transaction_factory = http_transaction_factory();
96 if (!transaction_factory) 96 if (!transaction_factory)
97 return nullptr; 97 return nullptr;
98 HttpNetworkSession* network_session = transaction_factory->GetSession(); 98 HttpNetworkSession* network_session = transaction_factory->GetSession();
99 if (!network_session) 99 if (!network_session)
100 return nullptr; 100 return nullptr;
101 return &network_session->params(); 101 return &network_session->params();
102 } 102 }
103 103
104 const HttpNetworkSession::Context* URLRequestContext::GetNetworkSessionContext()
105 const {
106 HttpTransactionFactory* transaction_factory = http_transaction_factory();
107 if (!transaction_factory)
108 return nullptr;
109 HttpNetworkSession* network_session = transaction_factory->GetSession();
110 if (!network_session)
111 return nullptr;
112 return &network_session->context();
113 }
114
104 std::unique_ptr<URLRequest> URLRequestContext::CreateRequest( 115 std::unique_ptr<URLRequest> URLRequestContext::CreateRequest(
105 const GURL& url, 116 const GURL& url,
106 RequestPriority priority, 117 RequestPriority priority,
107 URLRequest::Delegate* delegate) const { 118 URLRequest::Delegate* delegate) const {
108 return CreateRequest(url, priority, delegate, MISSING_TRAFFIC_ANNOTATION); 119 return CreateRequest(url, priority, delegate, MISSING_TRAFFIC_ANNOTATION);
109 } 120 }
110 121
111 std::unique_ptr<URLRequest> URLRequestContext::CreateRequest( 122 std::unique_ptr<URLRequest> URLRequestContext::CreateRequest(
112 const GURL& url, 123 const GURL& url,
113 RequestPriority priority, 124 RequestPriority priority,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 HttpCache* http_cache = transaction_factory->GetCache(); 190 HttpCache* http_cache = transaction_factory->GetCache();
180 if (http_cache) 191 if (http_cache)
181 http_cache->DumpMemoryStats(pmd, dump->absolute_name()); 192 http_cache->DumpMemoryStats(pmd, dump->absolute_name());
182 } 193 }
183 if (sdch_manager_) 194 if (sdch_manager_)
184 sdch_manager_->DumpMemoryStats(pmd, dump_name); 195 sdch_manager_->DumpMemoryStats(pmd, dump_name);
185 return true; 196 return true;
186 } 197 }
187 198
188 } // namespace net 199 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_context.h ('k') | net/url_request/url_request_context_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698