Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 148443006: Linux: tear down Zygote at browser shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't call TearDown() while holding child_tracking_lock_. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/zygote_host/zygote_host_impl_linux.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 } 776 }
777 777
778 #if defined(USE_AURA) 778 #if defined(USE_AURA)
779 { 779 {
780 TRACE_EVENT0("shutdown", 780 TRACE_EVENT0("shutdown",
781 "BrowserMainLoop::Subsystem:ImageTransportFactory"); 781 "BrowserMainLoop::Subsystem:ImageTransportFactory");
782 ImageTransportFactory::Terminate(); 782 ImageTransportFactory::Terminate();
783 } 783 }
784 #endif 784 #endif
785 785
786 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
787 ZygoteHostImpl::GetInstance()->TearDownAfterLastChild();
788 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
789
786 // The device monitors are using |system_monitor_| as dependency, so delete 790 // The device monitors are using |system_monitor_| as dependency, so delete
787 // them before |system_monitor_| goes away. 791 // them before |system_monitor_| goes away.
788 // On Mac and windows, the monitor needs to be destroyed on the same thread 792 // On Mac and windows, the monitor needs to be destroyed on the same thread
789 // as they were created. On Linux, the monitor will be deleted when IO thread 793 // as they were created. On Linux, the monitor will be deleted when IO thread
790 // goes away. 794 // goes away.
791 #if defined(OS_WIN) 795 #if defined(OS_WIN)
792 system_message_window_.reset(); 796 system_message_window_.reset();
793 #elif defined(OS_MACOSX) 797 #elif defined(OS_MACOSX)
794 device_monitor_mac_.reset(); 798 device_monitor_mac_.reset();
795 #endif 799 #endif
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 base::TimeDelta::FromSeconds(delay_secs)); 1117 base::TimeDelta::FromSeconds(delay_secs));
1114 } 1118 }
1115 1119
1116 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) { 1120 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) {
1117 is_tracing_startup_ = false; 1121 is_tracing_startup_ = false;
1118 TracingController::GetInstance()->DisableRecording( 1122 TracingController::GetInstance()->DisableRecording(
1119 trace_file, TracingController::TracingFileResultCallback()); 1123 trace_file, TracingController::TracingFileResultCallback());
1120 } 1124 }
1121 1125
1122 } // namespace content 1126 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/zygote_host/zygote_host_impl_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698