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

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

Issue 1175733002: [Cronet] Set up HttpServerPropertiesManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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_builder.h" 5 #include "net/url_request/url_request_context_builder.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 storage->set_transport_security_state(new TransportSecurityState()); 325 storage->set_transport_security_state(new TransportSecurityState());
326 if (!transport_security_persister_path_.empty()) { 326 if (!transport_security_persister_path_.empty()) {
327 context->set_transport_security_persister( 327 context->set_transport_security_persister(
328 make_scoped_ptr<TransportSecurityPersister>( 328 make_scoped_ptr<TransportSecurityPersister>(
329 new TransportSecurityPersister(context->transport_security_state(), 329 new TransportSecurityPersister(context->transport_security_state(),
330 transport_security_persister_path_, 330 transport_security_persister_path_,
331 context->GetFileTaskRunner(), 331 context->GetFileTaskRunner(),
332 false))); 332 false)));
333 } 333 }
334 334
335 storage->set_http_server_properties( 335 if (http_server_properties_) {
336 scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl())); 336 context->set_http_server_properties(http_server_properties_);
337 } else {
338 storage->set_http_server_properties(
339 scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
340 }
341
337 storage->set_cert_verifier(CertVerifier::CreateDefault()); 342 storage->set_cert_verifier(CertVerifier::CreateDefault());
338 343
339 if (throttling_enabled_) 344 if (throttling_enabled_)
340 storage->set_throttler_manager(new URLRequestThrottlerManager()); 345 storage->set_throttler_manager(new URLRequestThrottlerManager());
341 346
342 HttpNetworkSession::Params network_session_params; 347 HttpNetworkSession::Params network_session_params;
343 network_session_params.host_resolver = context->host_resolver(); 348 network_session_params.host_resolver = context->host_resolver();
344 network_session_params.cert_verifier = context->cert_verifier(); 349 network_session_params.cert_verifier = context->cert_verifier();
345 network_session_params.transport_security_state = 350 network_session_params.transport_security_state =
346 context->transport_security_state(); 351 context->transport_security_state();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 } 432 }
428 url_request_interceptors_.weak_clear(); 433 url_request_interceptors_.weak_clear();
429 } 434 }
430 storage->set_job_factory(top_job_factory.release()); 435 storage->set_job_factory(top_job_factory.release());
431 // TODO(willchan): Support sdch. 436 // TODO(willchan): Support sdch.
432 437
433 return context; 438 return context;
434 } 439 }
435 440
436 } // namespace net 441 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698