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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) | 53 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) |
54 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" | 54 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" |
55 #endif | 55 #endif |
56 | 56 |
57 using tracked_objects::ThreadData; | 57 using tracked_objects::ThreadData; |
58 | 58 |
59 namespace content { | 59 namespace content { |
60 namespace { | 60 namespace { |
61 | 61 |
62 // How long to wait for a connection to the browser process before giving up. | 62 // How long to wait for a connection to the browser process before giving up. |
63 const int kConnectionTimeoutS = 15; | 63 const int kConnectionTimeoutS = 1500; |
Avi (use Gerrit)
2014/03/27 18:36:50
What is this doing in this CL?
| |
64 | 64 |
65 base::LazyInstance<base::ThreadLocalPointer<ChildThread> > g_lazy_tls = | 65 base::LazyInstance<base::ThreadLocalPointer<ChildThread> > g_lazy_tls = |
66 LAZY_INSTANCE_INITIALIZER; | 66 LAZY_INSTANCE_INITIALIZER; |
67 | 67 |
68 // This isn't needed on Windows because there the sandbox's job object | 68 // This isn't needed on Windows because there the sandbox's job object |
69 // terminates child processes automatically. For unsandboxed processes (i.e. | 69 // terminates child processes automatically. For unsandboxed processes (i.e. |
70 // plugins), PluginThread has EnsureTerminateMessageFilter. | 70 // plugins), PluginThread has EnsureTerminateMessageFilter. |
71 #if defined(OS_POSIX) | 71 #if defined(OS_POSIX) |
72 | 72 |
73 // A thread delegate that waits for |duration| and then signals the process | 73 // A thread delegate that waits for |duration| and then signals the process |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
538 // inflight that would addref it. | 538 // inflight that would addref it. |
539 Send(new ChildProcessHostMsg_ShutdownRequest); | 539 Send(new ChildProcessHostMsg_ShutdownRequest); |
540 } | 540 } |
541 | 541 |
542 void ChildThread::EnsureConnected() { | 542 void ChildThread::EnsureConnected() { |
543 VLOG(0) << "ChildThread::EnsureConnected()"; | 543 VLOG(0) << "ChildThread::EnsureConnected()"; |
544 base::KillProcess(base::GetCurrentProcessHandle(), 0, false); | 544 base::KillProcess(base::GetCurrentProcessHandle(), 0, false); |
545 } | 545 } |
546 | 546 |
547 } // namespace content | 547 } // namespace content |
OLD | NEW |