OLD | NEW |
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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 extensions_request_context_ = new ChromeURLRequestContext; | 432 extensions_request_context_ = new ChromeURLRequestContext; |
433 | 433 |
434 chrome_url_data_manager_backend_.reset(new ChromeURLDataManagerBackend); | 434 chrome_url_data_manager_backend_.reset(new ChromeURLDataManagerBackend); |
435 | 435 |
436 network_delegate_.reset(new ChromeNetworkDelegate( | 436 network_delegate_.reset(new ChromeNetworkDelegate( |
437 io_thread_globals->extension_event_router_forwarder.get(), | 437 io_thread_globals->extension_event_router_forwarder.get(), |
438 profile_params_->extension_info_map, | 438 profile_params_->extension_info_map, |
439 url_blacklist_manager_.get(), | 439 url_blacklist_manager_.get(), |
440 profile_params_->profile, | 440 profile_params_->profile, |
441 profile_params_->cookie_settings, | 441 profile_params_->cookie_settings, |
442 &enable_referrers_)); | 442 profile_params_->is_incognito ? ChromeNetworkDelegate::INCOGNITO_ON : |
| 443 ChromeNetworkDelegate::INCOGNITO_OFF, |
| 444 &enable_referrers_, |
| 445 &enable_metrics_)); |
443 | 446 |
444 fraudulent_certificate_reporter_.reset( | 447 fraudulent_certificate_reporter_.reset( |
445 new chrome_browser_net::ChromeFraudulentCertificateReporter( | 448 new chrome_browser_net::ChromeFraudulentCertificateReporter( |
446 main_request_context_)); | 449 main_request_context_)); |
447 | 450 |
448 proxy_service_.reset( | 451 proxy_service_.reset( |
449 ProxyServiceFactory::CreateProxyService( | 452 ProxyServiceFactory::CreateProxyService( |
450 io_thread->net_log(), | 453 io_thread->net_log(), |
451 io_thread_globals->proxy_script_fetcher_context.get(), | 454 io_thread_globals->proxy_script_fetcher_context.get(), |
452 profile_params_->proxy_config_service.release(), | 455 profile_params_->proxy_config_service.release(), |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 context->set_is_incognito(profile_params_->is_incognito); | 514 context->set_is_incognito(profile_params_->is_incognito); |
512 context->set_accept_language(profile_params_->accept_language); | 515 context->set_accept_language(profile_params_->accept_language); |
513 context->set_accept_charset(profile_params_->accept_charset); | 516 context->set_accept_charset(profile_params_->accept_charset); |
514 context->set_referrer_charset(profile_params_->referrer_charset); | 517 context->set_referrer_charset(profile_params_->referrer_charset); |
515 context->set_ssl_config_service(profile_params_->ssl_config_service); | 518 context->set_ssl_config_service(profile_params_->ssl_config_service); |
516 } | 519 } |
517 | 520 |
518 void ProfileIOData::ShutdownOnUIThread() { | 521 void ProfileIOData::ShutdownOnUIThread() { |
519 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 522 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
520 enable_referrers_.Destroy(); | 523 enable_referrers_.Destroy(); |
| 524 enable_metrics_.Destroy(); |
521 clear_local_state_on_exit_.Destroy(); | 525 clear_local_state_on_exit_.Destroy(); |
522 safe_browsing_enabled_.Destroy(); | 526 safe_browsing_enabled_.Destroy(); |
523 session_startup_pref_.Destroy(); | 527 session_startup_pref_.Destroy(); |
524 #if defined(ENABLE_CONFIGURATION_POLICY) | 528 #if defined(ENABLE_CONFIGURATION_POLICY) |
525 if (url_blacklist_manager_.get()) | 529 if (url_blacklist_manager_.get()) |
526 url_blacklist_manager_->ShutdownOnUIThread(); | 530 url_blacklist_manager_->ShutdownOnUIThread(); |
527 #endif | 531 #endif |
528 bool posted = BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this); | 532 bool posted = BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this); |
529 if (!posted) | 533 if (!posted) |
530 delete this; | 534 delete this; |
531 } | 535 } |
532 | 536 |
533 void ProfileIOData::set_server_bound_cert_service( | 537 void ProfileIOData::set_server_bound_cert_service( |
534 net::ServerBoundCertService* server_bound_cert_service) const { | 538 net::ServerBoundCertService* server_bound_cert_service) const { |
535 server_bound_cert_service_.reset(server_bound_cert_service); | 539 server_bound_cert_service_.reset(server_bound_cert_service); |
536 } | 540 } |
OLD | NEW |