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

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

Issue 1389213003: [Cronet] Use Https for Quic Test Server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ryancl
Patch Set: Address Misha's comments Created 5 years, 2 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_builder.h ('k') | no next file » | 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_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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 http_cache_params_ = HttpCacheParams(); 235 http_cache_params_ = HttpCacheParams();
236 } 236 }
237 237
238 void URLRequestContextBuilder::SetSpdyAndQuicEnabled(bool spdy_enabled, 238 void URLRequestContextBuilder::SetSpdyAndQuicEnabled(bool spdy_enabled,
239 bool quic_enabled) { 239 bool quic_enabled) {
240 http_network_session_params_.next_protos = 240 http_network_session_params_.next_protos =
241 NextProtosWithSpdyAndQuic(spdy_enabled, quic_enabled); 241 NextProtosWithSpdyAndQuic(spdy_enabled, quic_enabled);
242 http_network_session_params_.enable_quic = quic_enabled; 242 http_network_session_params_.enable_quic = quic_enabled;
243 } 243 }
244 244
245 void URLRequestContextBuilder::SetCertVerifier(
246 scoped_ptr<CertVerifier> cert_verifier) {
247 cert_verifier_ = cert_verifier.Pass();
248 }
249
245 void URLRequestContextBuilder::SetInterceptors( 250 void URLRequestContextBuilder::SetInterceptors(
246 ScopedVector<URLRequestInterceptor> url_request_interceptors) { 251 ScopedVector<URLRequestInterceptor> url_request_interceptors) {
247 url_request_interceptors_ = url_request_interceptors.Pass(); 252 url_request_interceptors_ = url_request_interceptors.Pass();
248 } 253 }
249 254
250 void URLRequestContextBuilder::SetCookieAndChannelIdStores( 255 void URLRequestContextBuilder::SetCookieAndChannelIdStores(
251 const scoped_refptr<CookieStore>& cookie_store, 256 const scoped_refptr<CookieStore>& cookie_store,
252 scoped_ptr<ChannelIDService> channel_id_service) { 257 scoped_ptr<ChannelIDService> channel_id_service) {
253 DCHECK(cookie_store); 258 DCHECK(cookie_store);
254 cookie_store_ = cookie_store; 259 cookie_store_ = cookie_store;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 false))); 350 false)));
346 } 351 }
347 352
348 if (http_server_properties_) { 353 if (http_server_properties_) {
349 storage->set_http_server_properties(http_server_properties_.Pass()); 354 storage->set_http_server_properties(http_server_properties_.Pass());
350 } else { 355 } else {
351 storage->set_http_server_properties( 356 storage->set_http_server_properties(
352 scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl())); 357 scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
353 } 358 }
354 359
355 storage->set_cert_verifier(CertVerifier::CreateDefault()); 360 if (cert_verifier_) {
361 storage->set_cert_verifier(cert_verifier_.Pass());
362 } else {
363 storage->set_cert_verifier(CertVerifier::CreateDefault());
364 }
356 365
357 if (throttling_enabled_) { 366 if (throttling_enabled_) {
358 storage->set_throttler_manager( 367 storage->set_throttler_manager(
359 make_scoped_ptr(new URLRequestThrottlerManager())); 368 make_scoped_ptr(new URLRequestThrottlerManager()));
360 } 369 }
361 370
362 if (backoff_enabled_) { 371 if (backoff_enabled_) {
363 storage->set_backoff_manager( 372 storage->set_backoff_manager(
364 make_scoped_ptr(new URLRequestBackoffManager())); 373 make_scoped_ptr(new URLRequestBackoffManager()));
365 } 374 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 } 453 }
445 url_request_interceptors_.weak_clear(); 454 url_request_interceptors_.weak_clear();
446 } 455 }
447 storage->set_job_factory(top_job_factory.Pass()); 456 storage->set_job_factory(top_job_factory.Pass());
448 // TODO(willchan): Support sdch. 457 // TODO(willchan): Support sdch.
449 458
450 return context.Pass(); 459 return context.Pass();
451 } 460 }
452 461
453 } // namespace net 462 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_context_builder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698