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

Side by Side Diff: content/common/child_process.cc

Issue 11227033: Move a bunch of code in content\common (as well as a few left in renderer) to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 2 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 | « content/common/child_process.h ('k') | content/common/child_thread.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/common/child_process.h" 5 #include "content/common/child_process.h"
6 6
7 #if defined(OS_POSIX) && !defined(OS_ANDROID) 7 #if defined(OS_POSIX) && !defined(OS_ANDROID)
8 #include <signal.h> // For SigUSR1Handler below. 8 #include <signal.h> // For SigUSR1Handler below.
9 #endif 9 #endif
10 10
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/metrics/statistics_recorder.h" 12 #include "base/metrics/statistics_recorder.h"
13 #include "base/process_util.h" 13 #include "base/process_util.h"
14 #include "base/string_number_conversions.h" 14 #include "base/string_number_conversions.h"
15 #include "base/threading/thread.h" 15 #include "base/threading/thread.h"
16 #include "base/utf_string_conversions.h" 16 #include "base/utf_string_conversions.h"
17 #include "content/common/child_thread.h" 17 #include "content/common/child_thread.h"
18 18
19 #if defined(OS_ANDROID) 19 #if defined(OS_ANDROID)
20 #include "base/debug/debugger.h" 20 #include "base/debug/debugger.h"
21 #endif 21 #endif
22 22
23 #if defined(OS_POSIX) && !defined(OS_ANDROID) 23 #if defined(OS_POSIX) && !defined(OS_ANDROID)
24 static void SigUSR1Handler(int signal) { } 24 static void SigUSR1Handler(int signal) { }
25 #endif 25 #endif
26 26
27 namespace content {
28
27 ChildProcess* ChildProcess::child_process_; 29 ChildProcess* ChildProcess::child_process_;
28 30
29 ChildProcess::ChildProcess() 31 ChildProcess::ChildProcess()
30 : ref_count_(0), 32 : ref_count_(0),
31 shutdown_event_(true, false), 33 shutdown_event_(true, false),
32 io_thread_("Chrome_ChildIOThread") { 34 io_thread_("Chrome_ChildIOThread") {
33 DCHECK(!child_process_); 35 DCHECK(!child_process_);
34 child_process_ = this; 36 child_process_ = this;
35 37
36 base::StatisticsRecorder::Initialize(); 38 base::StatisticsRecorder::Initialize();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // Install a signal handler so that pause can be woken. 119 // Install a signal handler so that pause can be woken.
118 struct sigaction sa; 120 struct sigaction sa;
119 memset(&sa, 0, sizeof(sa)); 121 memset(&sa, 0, sizeof(sa));
120 sa.sa_handler = SigUSR1Handler; 122 sa.sa_handler = SigUSR1Handler;
121 sigaction(SIGUSR1, &sa, NULL); 123 sigaction(SIGUSR1, &sa, NULL);
122 124
123 pause(); 125 pause();
124 #endif // defined(OS_ANDROID) 126 #endif // defined(OS_ANDROID)
125 #endif // defined(OS_POSIX) 127 #endif // defined(OS_POSIX)
126 } 128 }
129
130 } // namespace content
OLDNEW
« no previous file with comments | « content/common/child_process.h ('k') | content/common/child_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698