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/child/child_thread.h" | 5 #include "content/child/child_thread.h" |
6 | 6 |
7 #include <signal.h> | 7 #include <signal.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "base/synchronization/condition_variable.h" | 22 #include "base/synchronization/condition_variable.h" |
23 #include "base/synchronization/lock.h" | 23 #include "base/synchronization/lock.h" |
24 #include "base/threading/thread_local.h" | 24 #include "base/threading/thread_local.h" |
25 #include "base/tracked_objects.h" | 25 #include "base/tracked_objects.h" |
26 #include "components/tracing/child_trace_message_filter.h" | 26 #include "components/tracing/child_trace_message_filter.h" |
27 #include "content/child/child_histogram_message_filter.h" | 27 #include "content/child/child_histogram_message_filter.h" |
28 #include "content/child/child_process.h" | 28 #include "content/child/child_process.h" |
29 #include "content/child/child_resource_message_filter.h" | 29 #include "content/child/child_resource_message_filter.h" |
30 #include "content/child/child_shared_bitmap_manager.h" | 30 #include "content/child/child_shared_bitmap_manager.h" |
31 #include "content/child/fileapi/file_system_dispatcher.h" | 31 #include "content/child/fileapi/file_system_dispatcher.h" |
| 32 #include "content/child/fileapi/webfilesystem_impl.h" |
32 #include "content/child/power_monitor_broadcast_source.h" | 33 #include "content/child/power_monitor_broadcast_source.h" |
33 #include "content/child/quota_dispatcher.h" | 34 #include "content/child/quota_dispatcher.h" |
34 #include "content/child/quota_message_filter.h" | 35 #include "content/child/quota_message_filter.h" |
35 #include "content/child/resource_dispatcher.h" | 36 #include "content/child/resource_dispatcher.h" |
36 #include "content/child/service_worker/service_worker_dispatcher.h" | 37 #include "content/child/service_worker/service_worker_dispatcher.h" |
37 #include "content/child/service_worker/service_worker_message_filter.h" | 38 #include "content/child/service_worker/service_worker_message_filter.h" |
38 #include "content/child/socket_stream_dispatcher.h" | 39 #include "content/child/socket_stream_dispatcher.h" |
39 #include "content/child/thread_safe_sender.h" | 40 #include "content/child/thread_safe_sender.h" |
40 #include "content/child/websocket_dispatcher.h" | 41 #include "content/child/websocket_dispatcher.h" |
41 #include "content/common/child_process_messages.h" | 42 #include "content/common/child_process_messages.h" |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 // but it wasn't possible to do so on POSIX. | 337 // but it wasn't possible to do so on POSIX. |
337 channel_->ClearIPCTaskRunner(); | 338 channel_->ClearIPCTaskRunner(); |
338 g_lazy_tls.Pointer()->Set(NULL); | 339 g_lazy_tls.Pointer()->Set(NULL); |
339 } | 340 } |
340 | 341 |
341 void ChildThread::Shutdown() { | 342 void ChildThread::Shutdown() { |
342 // Delete objects that hold references to blink so derived classes can | 343 // Delete objects that hold references to blink so derived classes can |
343 // safely shutdown blink in their Shutdown implementation. | 344 // safely shutdown blink in their Shutdown implementation. |
344 file_system_dispatcher_.reset(); | 345 file_system_dispatcher_.reset(); |
345 quota_dispatcher_.reset(); | 346 quota_dispatcher_.reset(); |
| 347 WebFileSystemImpl::DeleteThreadSpecificInstance(); |
346 } | 348 } |
347 | 349 |
348 void ChildThread::OnChannelConnected(int32 peer_pid) { | 350 void ChildThread::OnChannelConnected(int32 peer_pid) { |
349 channel_connected_factory_.InvalidateWeakPtrs(); | 351 channel_connected_factory_.InvalidateWeakPtrs(); |
350 } | 352 } |
351 | 353 |
352 void ChildThread::OnChannelError() { | 354 void ChildThread::OnChannelError() { |
353 set_on_channel_error_called(true); | 355 set_on_channel_error_called(true); |
354 base::MessageLoop::current()->Quit(); | 356 base::MessageLoop::current()->Quit(); |
355 } | 357 } |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 // inflight that would addref it. | 540 // inflight that would addref it. |
539 Send(new ChildProcessHostMsg_ShutdownRequest); | 541 Send(new ChildProcessHostMsg_ShutdownRequest); |
540 } | 542 } |
541 | 543 |
542 void ChildThread::EnsureConnected() { | 544 void ChildThread::EnsureConnected() { |
543 VLOG(0) << "ChildThread::EnsureConnected()"; | 545 VLOG(0) << "ChildThread::EnsureConnected()"; |
544 base::KillProcess(base::GetCurrentProcessHandle(), 0, false); | 546 base::KillProcess(base::GetCurrentProcessHandle(), 0, false); |
545 } | 547 } |
546 | 548 |
547 } // namespace content | 549 } // namespace content |
OLD | NEW |