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

Unified Diff: components/nacl/browser/nacl_broker_host_win.cc

Issue 75463005: Move more files from chrome/browser/nacl_host/ to components/nacl/browser/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
Index: components/nacl/browser/nacl_broker_host_win.cc
diff --git a/chrome/browser/nacl_host/nacl_broker_host_win.cc b/components/nacl/browser/nacl_broker_host_win.cc
similarity index 92%
rename from chrome/browser/nacl_host/nacl_broker_host_win.cc
rename to components/nacl/browser/nacl_broker_host_win.cc
index 50764ab5cb7e4d1a036856203a974e489c31a937..878ca6e878828f8b49b1b7e56257962438ad7b84 100644
--- a/chrome/browser/nacl_host/nacl_broker_host_win.cc
+++ b/components/nacl/browser/nacl_broker_host_win.cc
@@ -2,13 +2,12 @@
// 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_broker_host_win.h"
+#include "components/nacl/browser/nacl_broker_host_win.h"
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/path_service.h"
-#include "ipc/ipc_switches.h"
-#include "chrome/browser/nacl_host/nacl_broker_service_win.h"
+#include "components/nacl/browser/nacl_broker_service_win.h"
#include "components/nacl/browser/nacl_browser.h"
#include "components/nacl/common/nacl_cmd_line.h"
#include "components/nacl/common/nacl_messages.h"
@@ -19,6 +18,7 @@
#include "content/public/common/child_process_host.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/sandboxed_process_launcher_delegate.h"
+#include "ipc/ipc_switches.h"
namespace {
// NOTE: changes to this class need to be reviewed by the security team.
@@ -37,6 +37,8 @@ class NaClBrokerSandboxedProcessLauncherDelegate
};
} // namespace
+namespace nacl {
+
NaClBrokerHost::NaClBrokerHost() : is_terminating_(false) {
process_.reset(content::BrowserChildProcessHost::Create(
PROCESS_TYPE_NACL_BROKER, this));
@@ -53,16 +55,16 @@ bool NaClBrokerHost::Init() {
// Create the path to the nacl broker/loader executable.
base::FilePath nacl_path;
- if (!nacl::NaClBrowser::GetInstance()->GetNaCl64ExePath(&nacl_path))
+ if (!NaClBrowser::GetInstance()->GetNaCl64ExePath(&nacl_path))
return false;
CommandLine* cmd_line = new CommandLine(nacl_path);
- nacl::CopyNaClCommandLineArguments(cmd_line);
+ CopyNaClCommandLineArguments(cmd_line);
cmd_line->AppendSwitchASCII(switches::kProcessType,
switches::kNaClBrokerProcess);
cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id);
- if (nacl::NaClBrowser::GetDelegate()->DialogsAreSuppressed())
+ if (NaClBrowser::GetDelegate()->DialogsAreSuppressed())
cmd_line->AppendSwitch(switches::kNoErrorDialogs);
process_->Launch(new NaClBrokerSandboxedProcessLauncherDelegate, cmd_line);
@@ -112,3 +114,5 @@ void NaClBrokerHost::StopBroker() {
is_terminating_ = true;
process_->Send(new NaClProcessMsg_StopBroker());
}
+
+} // namespace nacl

Powered by Google App Engine
This is Rietveld 408576698