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

Unified Diff: content/browser/child_process_launcher.cc

Issue 11235068: Move the remaning files in content\common to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/child_process_launcher.h ('k') | content/browser/gpu/gpu_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/child_process_launcher.cc
===================================================================
--- content/browser/child_process_launcher.cc (revision 163632)
+++ content/browser/child_process_launcher.cc (working copy)
@@ -38,7 +38,7 @@
#include "base/global_descriptors_posix.h"
#endif
-using content::BrowserThread;
+namespace content {
// Having the functionality of ChildProcessLauncher be in an internal
// ref counted object allows us to automatically terminate the process when the
@@ -50,7 +50,7 @@
: client_(NULL),
client_thread_id_(BrowserThread::UI),
termination_status_(base::TERMINATION_STATUS_NORMAL_TERMINATION),
- exit_code_(content::RESULT_CODE_NORMAL_EXIT),
+ exit_code_(RESULT_CODE_NORMAL_EXIT),
starting_(true)
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
, zygote_(false)
@@ -166,15 +166,15 @@
#elif defined(OS_ANDROID)
std::string process_type =
cmd_line->GetSwitchValueASCII(switches::kProcessType);
- std::vector<content::FileDescriptorInfo> files_to_register;
+ std::vector<FileDescriptorInfo> files_to_register;
files_to_register.push_back(
- content::FileDescriptorInfo(kPrimaryIPCChannel,
- base::FileDescriptor(ipcfd, false)));
+ FileDescriptorInfo(kPrimaryIPCChannel,
+ base::FileDescriptor(ipcfd, false)));
- content::GetContentClient()->browser()->
+ GetContentClient()->browser()->
GetAdditionalMappedFilesForChildProcess(*cmd_line, &files_to_register);
- content::StartSandboxedProcess(cmd_line->argv(), files_to_register,
+ StartSandboxedProcess(cmd_line->argv(), files_to_register,
base::Bind(&ChildProcessLauncher::Context::OnSandboxedProcessStarted,
this_object, client_thread_id));
@@ -186,13 +186,13 @@
std::string process_type =
cmd_line->GetSwitchValueASCII(switches::kProcessType);
- std::vector<content::FileDescriptorInfo> files_to_register;
+ std::vector<FileDescriptorInfo> files_to_register;
files_to_register.push_back(
- content::FileDescriptorInfo(kPrimaryIPCChannel,
- base::FileDescriptor(ipcfd, false)));
+ FileDescriptorInfo(kPrimaryIPCChannel,
+ base::FileDescriptor(ipcfd, false)));
#if !defined(OS_MACOSX)
- content::GetContentClient()->browser()->
+ GetContentClient()->browser()->
GetAdditionalMappedFilesForChildProcess(*cmd_line, &files_to_register);
if (use_zygote) {
handle = ZygoteHostImpl::GetInstance()->ForkRequest(cmd_line->argv(),
@@ -204,9 +204,9 @@
{
// Convert FD mapping to FileHandleMappingVector
base::FileHandleMappingVector fds_to_map;
- for (std::vector<content::FileDescriptorInfo>::const_iterator
+ for (std::vector<FileDescriptorInfo>::const_iterator
i = files_to_register.begin(); i != files_to_register.end(); ++i) {
- const content::FileDescriptorInfo& fd_info = *i;
+ const FileDescriptorInfo& fd_info = *i;
fds_to_map.push_back(std::make_pair(
fd_info.fd.fd,
fd_info.id + base::GlobalDescriptors::kBaseDescriptor));
@@ -328,12 +328,12 @@
base::ProcessHandle handle) {
#if defined(OS_ANDROID)
LOG(INFO) << "ChromeProcess: Stopping process with handle " << handle;
- content::StopSandboxedProcess(handle);
+ StopSandboxedProcess(handle);
#else
base::Process process(handle);
// Client has gone away, so just kill the process. Using exit code 0
// means that UMA won't treat this as a crash.
- process.Terminate(content::RESULT_CODE_NORMAL_EXIT);
+ process.Terminate(RESULT_CODE_NORMAL_EXIT);
// On POSIX, we must additionally reap the child.
#if defined(OS_POSIX)
#if !defined(OS_MACOSX)
@@ -455,3 +455,5 @@
if (context_)
context_->set_terminate_child_on_shutdown(terminate_on_shutdown);
}
+
+} // namespace content
« no previous file with comments | « content/browser/child_process_launcher.h ('k') | content/browser/gpu/gpu_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698