| 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 "content/browser/browser_process_sub_thread.h" | 5 #include "content/browser/browser_process_sub_thread.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <Objbase.h> | 8 #include <Objbase.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| 11 #include "base/debug/leak_tracker.h" | 11 #include "base/debug/leak_tracker.h" |
| 12 #include "base/threading/thread_restrictions.h" | 12 #include "base/threading/thread_restrictions.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "content/browser/browser_child_process_host_impl.h" | 14 #include "content/browser/browser_child_process_host_impl.h" |
| 15 #include "content/browser/in_process_webkit/indexed_db_key_utility_client.h" | |
| 16 #include "content/browser/notification_service_impl.h" | 15 #include "content/browser/notification_service_impl.h" |
| 17 #include "net/url_request/url_fetcher.h" | 16 #include "net/url_request/url_fetcher.h" |
| 18 #include "net/url_request/url_request.h" | 17 #include "net/url_request/url_request.h" |
| 19 | 18 |
| 20 namespace content { | 19 namespace content { |
| 21 | 20 |
| 22 BrowserProcessSubThread::BrowserProcessSubThread(BrowserThread::ID identifier) | 21 BrowserProcessSubThread::BrowserProcessSubThread(BrowserThread::ID identifier) |
| 23 : BrowserThreadImpl(identifier), | 22 : BrowserThreadImpl(identifier), |
| 24 notification_service_(NULL) { | 23 notification_service_(NULL) { |
| 25 } | 24 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 #endif | 62 #endif |
| 64 } | 63 } |
| 65 | 64 |
| 66 void BrowserProcessSubThread::IOThreadPreCleanUp() { | 65 void BrowserProcessSubThread::IOThreadPreCleanUp() { |
| 67 // Kill all things that might be holding onto | 66 // Kill all things that might be holding onto |
| 68 // net::URLRequest/net::URLRequestContexts. | 67 // net::URLRequest/net::URLRequestContexts. |
| 69 | 68 |
| 70 // Destroy all URLRequests started by URLFetchers. | 69 // Destroy all URLRequests started by URLFetchers. |
| 71 net::URLFetcher::CancelAll(); | 70 net::URLFetcher::CancelAll(); |
| 72 | 71 |
| 73 IndexedDBKeyUtilityClient::Shutdown(); | |
| 74 | |
| 75 // If any child processes are still running, terminate them and | 72 // If any child processes are still running, terminate them and |
| 76 // and delete the BrowserChildProcessHost instances to release whatever | 73 // and delete the BrowserChildProcessHost instances to release whatever |
| 77 // IO thread only resources they are referencing. | 74 // IO thread only resources they are referencing. |
| 78 BrowserChildProcessHostImpl::TerminateAll(); | 75 BrowserChildProcessHostImpl::TerminateAll(); |
| 79 } | 76 } |
| 80 | 77 |
| 81 } // namespace content | 78 } // namespace content |
| OLD | NEW |