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_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 TRACE_EVENT0("shutdown", "BrowserMainLoop::ShutdownThreadsAndCleanUp") | 733 TRACE_EVENT0("shutdown", "BrowserMainLoop::ShutdownThreadsAndCleanUp") |
734 | 734 |
735 // Teardown may start in PostMainMessageLoopRun, and during teardown we | 735 // Teardown may start in PostMainMessageLoopRun, and during teardown we |
736 // need to be able to perform IO. | 736 // need to be able to perform IO. |
737 base::ThreadRestrictions::SetIOAllowed(true); | 737 base::ThreadRestrictions::SetIOAllowed(true); |
738 BrowserThread::PostTask( | 738 BrowserThread::PostTask( |
739 BrowserThread::IO, FROM_HERE, | 739 BrowserThread::IO, FROM_HERE, |
740 base::Bind(base::IgnoreResult(&base::ThreadRestrictions::SetIOAllowed), | 740 base::Bind(base::IgnoreResult(&base::ThreadRestrictions::SetIOAllowed), |
741 true)); | 741 true)); |
742 | 742 |
743 if (RenderProcessHost::run_renderer_in_process() && | 743 if (RenderProcessHost::run_renderer_in_process()) |
744 !RenderProcessHost::AllHostsIterator().IsAtEnd()) { | 744 RenderProcessHost::ShutDownInProcessRenderer(); |
745 delete RenderProcessHost::AllHostsIterator().GetCurrentValue(); | |
746 } | |
747 | 745 |
748 if (parts_) { | 746 if (parts_) { |
749 TRACE_EVENT0("shutdown", | 747 TRACE_EVENT0("shutdown", |
750 "BrowserMainLoop::Subsystem:PostMainMessageLoopRun"); | 748 "BrowserMainLoop::Subsystem:PostMainMessageLoopRun"); |
751 parts_->PostMainMessageLoopRun(); | 749 parts_->PostMainMessageLoopRun(); |
752 } | 750 } |
753 | 751 |
754 trace_memory_controller_.reset(); | 752 trace_memory_controller_.reset(); |
755 system_stats_monitor_.reset(); | 753 system_stats_monitor_.reset(); |
756 | 754 |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 if (parameters_.ui_task) | 1067 if (parameters_.ui_task) |
1070 base::MessageLoopForUI::current()->PostTask(FROM_HERE, | 1068 base::MessageLoopForUI::current()->PostTask(FROM_HERE, |
1071 *parameters_.ui_task); | 1069 *parameters_.ui_task); |
1072 | 1070 |
1073 base::RunLoop run_loop; | 1071 base::RunLoop run_loop; |
1074 run_loop.Run(); | 1072 run_loop.Run(); |
1075 #endif | 1073 #endif |
1076 } | 1074 } |
1077 | 1075 |
1078 } // namespace content | 1076 } // namespace content |
OLD | NEW |