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

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 9415040: Refactor TransportSecurityState. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
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 "chrome/browser/profiles/profile_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 new chrome_browser_net::ChromeFraudulentCertificateReporter( 458 new chrome_browser_net::ChromeFraudulentCertificateReporter(
459 main_request_context_)); 459 main_request_context_));
460 460
461 proxy_service_.reset( 461 proxy_service_.reset(
462 ProxyServiceFactory::CreateProxyService( 462 ProxyServiceFactory::CreateProxyService(
463 io_thread->net_log(), 463 io_thread->net_log(),
464 io_thread_globals->proxy_script_fetcher_context.get(), 464 io_thread_globals->proxy_script_fetcher_context.get(),
465 profile_params_->proxy_config_service.release(), 465 profile_params_->proxy_config_service.release(),
466 command_line)); 466 command_line));
467 467
468 transport_security_state_.reset(new net::TransportSecurityState( 468 transport_security_state_.reset(new net::TransportSecurityState());
469 command_line.GetSwitchValueASCII(switches::kHstsHosts)));
470 transport_security_persister_.reset( 469 transport_security_persister_.reset(
471 new TransportSecurityPersister(transport_security_state_.get(), 470 new TransportSecurityPersister(transport_security_state_.get(),
472 profile_params_->path, 471 profile_params_->path,
473 profile_params_->is_incognito)); 472 profile_params_->is_incognito));
473 const std::string& serialized =
474 command_line.GetSwitchValueASCII(switches::kHstsHosts);
475 transport_security_persister_.get()->DeserializeFromCommandLine(serialized);
474 476
475 // NOTE(willchan): Keep these protocol handlers in sync with 477 // NOTE(willchan): Keep these protocol handlers in sync with
476 // ProfileIOData::IsHandledProtocol(). 478 // ProfileIOData::IsHandledProtocol().
477 job_factory_.reset(new net::URLRequestJobFactory); 479 job_factory_.reset(new net::URLRequestJobFactory);
478 if (profile_params_->protocol_handler_registry) { 480 if (profile_params_->protocol_handler_registry) {
479 job_factory_->AddInterceptor( 481 job_factory_->AddInterceptor(
480 new ProtocolHandlerRegistryInterceptor( 482 new ProtocolHandlerRegistryInterceptor(
481 profile_params_->protocol_handler_registry)); 483 profile_params_->protocol_handler_registry));
482 } 484 }
483 bool set_protocol = job_factory_->SetProtocolHandler( 485 bool set_protocol = job_factory_->SetProtocolHandler(
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 #endif 542 #endif
541 bool posted = BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this); 543 bool posted = BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this);
542 if (!posted) 544 if (!posted)
543 delete this; 545 delete this;
544 } 546 }
545 547
546 void ProfileIOData::set_server_bound_cert_service( 548 void ProfileIOData::set_server_bound_cert_service(
547 net::ServerBoundCertService* server_bound_cert_service) const { 549 net::ServerBoundCertService* server_bound_cert_service) const {
548 server_bound_cert_service_.reset(server_bound_cert_service); 550 server_bound_cert_service_.reset(server_bound_cert_service);
549 } 551 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698