OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 #include "chrome/common/chrome_switches.h" | 42 #include "chrome/common/chrome_switches.h" |
43 #include "chrome/common/pref_names.h" | 43 #include "chrome/common/pref_names.h" |
44 #include "chrome/common/url_constants.h" | 44 #include "chrome/common/url_constants.h" |
45 #include "content/browser/appcache/chrome_appcache_service.h" | 45 #include "content/browser/appcache/chrome_appcache_service.h" |
46 #include "content/browser/chrome_blob_storage_context.h" | 46 #include "content/browser/chrome_blob_storage_context.h" |
47 #include "content/browser/download/download_id_factory.h" | 47 #include "content/browser/download/download_id_factory.h" |
48 #include "content/browser/host_zoom_map.h" | 48 #include "content/browser/host_zoom_map.h" |
49 #include "content/browser/renderer_host/media/media_stream_manager.h" | 49 #include "content/browser/renderer_host/media/media_stream_manager.h" |
50 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 50 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
51 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" | 51 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" |
52 #include "content/browser/renderer_host/render_process_host.h" | |
52 #include "content/browser/resource_context.h" | 53 #include "content/browser/resource_context.h" |
53 #include "content/public/browser/browser_thread.h" | 54 #include "content/public/browser/browser_thread.h" |
54 #include "content/public/browser/notification_service.h" | 55 #include "content/public/browser/notification_service.h" |
55 #include "net/base/origin_bound_cert_service.h" | 56 #include "net/base/origin_bound_cert_service.h" |
56 #include "net/http/http_transaction_factory.h" | 57 #include "net/http/http_transaction_factory.h" |
57 #include "net/http/http_util.h" | 58 #include "net/http/http_util.h" |
58 #include "net/proxy/proxy_config_service_fixed.h" | 59 #include "net/proxy/proxy_config_service_fixed.h" |
59 #include "net/proxy/proxy_script_fetcher_impl.h" | 60 #include "net/proxy/proxy_script_fetcher_impl.h" |
60 #include "net/proxy/proxy_service.h" | 61 #include "net/proxy/proxy_service.h" |
61 #include "net/url_request/url_request.h" | 62 #include "net/url_request/url_request.h" |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
534 ChromeURLRequestContext* context) const { | 535 ChromeURLRequestContext* context) const { |
535 context->set_is_incognito(profile_params_->is_incognito); | 536 context->set_is_incognito(profile_params_->is_incognito); |
536 context->set_accept_language(profile_params_->accept_language); | 537 context->set_accept_language(profile_params_->accept_language); |
537 context->set_accept_charset(profile_params_->accept_charset); | 538 context->set_accept_charset(profile_params_->accept_charset); |
538 context->set_referrer_charset(profile_params_->referrer_charset); | 539 context->set_referrer_charset(profile_params_->referrer_charset); |
539 context->set_ssl_config_service(profile_params_->ssl_config_service); | 540 context->set_ssl_config_service(profile_params_->ssl_config_service); |
540 } | 541 } |
541 | 542 |
542 void ProfileIOData::ShutdownOnUIThread() { | 543 void ProfileIOData::ShutdownOnUIThread() { |
543 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 544 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
545 DCHECK_EQ(0, RenderProcessHost::AllHostsCount()); | |
willchan no longer on Chromium
2011/11/17 20:11:32
I'd love to upgrade this to a CHECK so we can catc
robertshield
2011/11/17 21:00:43
Good idea, comment added.
| |
544 enable_referrers_.Destroy(); | 546 enable_referrers_.Destroy(); |
545 clear_local_state_on_exit_.Destroy(); | 547 clear_local_state_on_exit_.Destroy(); |
546 safe_browsing_enabled_.Destroy(); | 548 safe_browsing_enabled_.Destroy(); |
547 #if defined(ENABLE_CONFIGURATION_POLICY) | 549 #if defined(ENABLE_CONFIGURATION_POLICY) |
548 if (url_blacklist_manager_.get()) | 550 if (url_blacklist_manager_.get()) |
549 url_blacklist_manager_->ShutdownOnUIThread(); | 551 url_blacklist_manager_->ShutdownOnUIThread(); |
550 #endif | 552 #endif |
551 BrowserThread::PostTask( | 553 BrowserThread::PostTask( |
552 BrowserThread::IO, FROM_HERE, | 554 BrowserThread::IO, FROM_HERE, |
553 base::Bind( | 555 base::Bind( |
554 &ResourceDispatcherHost::CancelRequestsForContext, | 556 &ResourceDispatcherHost::CancelRequestsForContext, |
555 base::Unretained(g_browser_process->resource_dispatcher_host()), | 557 base::Unretained(g_browser_process->resource_dispatcher_host()), |
556 &resource_context_)); | 558 &resource_context_)); |
557 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 559 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
558 new DeleteTask<ProfileIOData>(this)); | 560 new DeleteTask<ProfileIOData>(this)); |
559 if (!posted) | 561 if (!posted) |
560 delete this; | 562 delete this; |
561 } | 563 } |
562 | 564 |
563 void ProfileIOData::set_origin_bound_cert_service( | 565 void ProfileIOData::set_origin_bound_cert_service( |
564 net::OriginBoundCertService* origin_bound_cert_service) const { | 566 net::OriginBoundCertService* origin_bound_cert_service) const { |
565 origin_bound_cert_service_.reset(origin_bound_cert_service); | 567 origin_bound_cert_service_.reset(origin_bound_cert_service); |
566 } | 568 } |
OLD | NEW |