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 #include "base/debug/leak_tracker.h" | 7 #include "base/debug/leak_tracker.h" |
8 #include "base/threading/thread_restrictions.h" | 8 #include "base/threading/thread_restrictions.h" |
| 9 #include "base/trace_event/memory_dump_manager.h" |
9 #include "build/build_config.h" | 10 #include "build/build_config.h" |
10 #include "content/browser/browser_child_process_host_impl.h" | 11 #include "content/browser/browser_child_process_host_impl.h" |
| 12 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
11 #include "content/browser/notification_service_impl.h" | 13 #include "content/browser/notification_service_impl.h" |
12 #include "net/url_request/url_fetcher.h" | 14 #include "net/url_request/url_fetcher.h" |
13 #include "net/url_request/url_request.h" | 15 #include "net/url_request/url_request.h" |
14 | 16 |
15 #if defined(OS_WIN) | 17 #if defined(OS_WIN) |
16 #include "base/win/scoped_com_initializer.h" | 18 #include "base/win/scoped_com_initializer.h" |
17 #endif | 19 #endif |
18 | 20 |
19 namespace content { | 21 namespace content { |
20 | 22 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 65 |
64 // Destroy all URLRequests started by URLFetchers. | 66 // Destroy all URLRequests started by URLFetchers. |
65 net::URLFetcher::CancelAll(); | 67 net::URLFetcher::CancelAll(); |
66 | 68 |
67 #if !defined(OS_IOS) | 69 #if !defined(OS_IOS) |
68 // If any child processes are still running, terminate them and | 70 // If any child processes are still running, terminate them and |
69 // and delete the BrowserChildProcessHost instances to release whatever | 71 // and delete the BrowserChildProcessHost instances to release whatever |
70 // IO thread only resources they are referencing. | 72 // IO thread only resources they are referencing. |
71 BrowserChildProcessHostImpl::TerminateAll(); | 73 BrowserChildProcessHostImpl::TerminateAll(); |
72 #endif // !defined(OS_IOS) | 74 #endif // !defined(OS_IOS) |
| 75 |
| 76 // Unregister GpuMemoryBuffer dump provider before IO thread is shut down. |
| 77 base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider( |
| 78 BrowserGpuMemoryBufferManager::current()); |
73 } | 79 } |
74 | 80 |
75 } // namespace content | 81 } // namespace content |
OLD | NEW |