Chromium Code Reviews| Index: components/nacl/browser/nacl_process_host.cc |
| diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/components/nacl/browser/nacl_process_host.cc |
| similarity index 98% |
| rename from chrome/browser/nacl_host/nacl_process_host.cc |
| rename to components/nacl/browser/nacl_process_host.cc |
| index 530ebbb50318b7ab873e46560581e670801946ad..3bd9f4628ee95bac4f7d46fef723f87e6a1f0362 100644 |
| --- a/chrome/browser/nacl_host/nacl_process_host.cc |
| +++ b/components/nacl/browser/nacl_process_host.cc |
| @@ -2,7 +2,7 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "chrome/browser/nacl_host/nacl_process_host.h" |
| +#include "components/nacl/browser/nacl_process_host.h" |
| #include <algorithm> |
| #include <string> |
| @@ -25,9 +25,8 @@ |
| #include "base/strings/utf_string_conversions.h" |
| #include "base/win/windows_version.h" |
| #include "build/build_config.h" |
| -#include "chrome/browser/nacl_host/nacl_host_message_filter.h" |
| -#include "chrome/common/chrome_switches.h" |
| #include "components/nacl/browser/nacl_browser.h" |
| +#include "components/nacl/browser/nacl_host_message_filter.h" |
| #include "components/nacl/common/nacl_cmd_line.h" |
| #include "components/nacl/common/nacl_host_messages.h" |
| #include "components/nacl/common/nacl_messages.h" |
| @@ -58,7 +57,7 @@ |
| #include "base/threading/thread.h" |
| #include "base/win/scoped_handle.h" |
| -#include "chrome/browser/nacl_host/nacl_broker_service_win.h" |
| +#include "components/nacl/browser/nacl_broker_service_win.h" |
| #include "components/nacl/common/nacl_debug_exception_handler_win.h" |
| #include "content/public/common/sandbox_init.h" |
| #include "content/public/common/sandboxed_process_launcher_delegate.h" |
| @@ -200,6 +199,8 @@ ppapi::PpapiPermissions GetNaClPermissions(uint32 permission_bits) { |
| } // namespace |
| +namespace nacl { |
| + |
| struct NaClProcessHost::NaClInternal { |
| NaClHandle socket_for_renderer; |
| NaClHandle socket_for_sel_ldr; |
| @@ -297,7 +298,7 @@ NaClProcessHost::~NaClProcessHost() { |
| } |
| #if defined(OS_WIN) |
| if (process_launched_by_broker_) { |
| - NaClBrokerService::GetInstance()->OnLoaderDied(); |
| + nacl::NaClBrokerService::GetInstance()->OnLoaderDied(); |
|
Mark Seaborn
2013/11/21 23:47:34
Same here, and below...
|
| } |
| #endif |
| } |
| @@ -334,7 +335,7 @@ void NaClProcessHost::EarlyStartup() { |
| } |
| void NaClProcessHost::Launch( |
| - NaClHostMessageFilter* nacl_host_message_filter, |
| + nacl::NaClHostMessageFilter* nacl_host_message_filter, |
| IPC::Message* reply_msg, |
| const base::FilePath& manifest_path) { |
| nacl_host_message_filter_ = nacl_host_message_filter; |
| @@ -534,7 +535,7 @@ bool NaClProcessHost::LaunchSelLdr() { |
| // On Windows we might need to start the broker process to launch a new loader |
| #if defined(OS_WIN) |
| if (RunningOnWOW64()) { |
| - if (!NaClBrokerService::GetInstance()->LaunchLoader( |
| + if (!nacl::NaClBrokerService::GetInstance()->LaunchLoader( |
| weak_factory_.GetWeakPtr(), channel_id)) { |
| SendErrorToRenderer("broker service did not launch process"); |
| return false; |
| @@ -1009,7 +1010,7 @@ bool NaClProcessHost::AttachDebugExceptionHandler(const std::string& info, |
| // broker process for this. Otherwise, on a 32-bit system, we use |
| // the 32-bit browser process to run the debug exception handler. |
| if (RunningOnWOW64()) { |
| - return NaClBrokerService::GetInstance()->LaunchDebugExceptionHandler( |
| + return nacl::NaClBrokerService::GetInstance()->LaunchDebugExceptionHandler( |
| weak_factory_.GetWeakPtr(), nacl_pid, process_handle, info); |
| } else { |
| NaClStartDebugExceptionHandlerThread( |
| @@ -1021,3 +1022,5 @@ bool NaClProcessHost::AttachDebugExceptionHandler(const std::string& info, |
| } |
| } |
| #endif |
| + |
| +} // namespace nacl |