Index: src/trusted/nonnacl_util/win/sel_ldr_launcher_win.cc |
diff --git a/src/trusted/nonnacl_util/win/sel_ldr_launcher_win.cc b/src/trusted/nonnacl_util/win/sel_ldr_launcher_win.cc |
index 1f42283bc116ccb058b915a5393b0e542228e0b2..1627b83805b9208f30744dfbb7a1feac75fb021d 100644 |
--- a/src/trusted/nonnacl_util/win/sel_ldr_launcher_win.cc |
+++ b/src/trusted/nonnacl_util/win/sel_ldr_launcher_win.cc |
@@ -23,9 +23,8 @@ using std::vector; |
namespace nacl { |
-SelLdrLauncher::~SelLdrLauncher() { |
+SelLdrLauncherStandalone::~SelLdrLauncherStandalone() { |
CloseHandlesAfterLaunch(); |
-#if defined(NACL_STANDALONE) |
if (kInvalidHandle != child_process_) { |
// Ensure child process (service runtime) is kaput. NB: we might |
// close the command channel (or use the hard_shutdown RPC) rather |
@@ -38,23 +37,19 @@ SelLdrLauncher::~SelLdrLauncher() { |
KillChildProcess(); |
CloseHandle(child_process_); |
} |
-#endif |
- if (kInvalidHandle != channel_) { |
- Close(channel_); |
- } |
} |
-nacl::string SelLdrLauncher::GetSelLdrPathName() { |
+nacl::string SelLdrLauncherStandalone::GetSelLdrPathName() { |
char buffer[FILENAME_MAX]; |
- // Currently only the Chrome build uses the gyp-generated binaries, and |
- // Chrome does not start sel_ldr by means of SelLdrLauncher. So we only |
- // refer to sel_ldr.exe here. |
+ // Currently only the Chrome build uses the gyp-generated binaries, |
+ // and Chrome does not start sel_ldr by means of |
+ // SelLdrLauncherStandalone. So we only refer to sel_ldr.exe here. |
const char* const kSelLdrBasename = "\\sel_ldr.exe"; |
GetPluginDirectory(buffer, sizeof(buffer)); |
return nacl::string(buffer) + kSelLdrBasename; |
} |
-nacl::string SelLdrLauncher::GetSelLdrBootstrapPathName() { |
+nacl::string SelLdrLauncherStandalone::GetSelLdrBootstrapPathName() { |
return nacl::string(NACL_NO_FILE_PATH); |
} |
@@ -76,7 +71,7 @@ static nacl::string Escape(nacl::string s) { |
return result; |
} |
-Handle SelLdrLauncher::CreateBootstrapSocket(nacl::string* dest_fd) { |
+Handle SelLdrLauncherStandalone::CreateBootstrapSocket(nacl::string* dest_fd) { |
Handle pair[2]; |
if (SocketPair(pair) == -1) { |
return kInvalidHandle; |
@@ -102,8 +97,7 @@ Handle SelLdrLauncher::CreateBootstrapSocket(nacl::string* dest_fd) { |
return pair[0]; |
} |
-#if defined(NACL_STANDALONE) |
-bool SelLdrLauncher::StartViaCommandLine( |
+bool SelLdrLauncherStandalone::StartViaCommandLine( |
const vector<nacl::string>& prefix, |
const vector<nacl::string>& sel_ldr_argv, |
const vector<nacl::string>& app_argv) { |
@@ -141,18 +135,13 @@ bool SelLdrLauncher::StartViaCommandLine( |
child_process_ = process_infomation.hProcess; |
return true; |
} |
-#endif |
-bool SelLdrLauncher::KillChildProcess() { |
-#if defined(NACL_STANDALONE) |
+bool SelLdrLauncherStandalone::KillChildProcess() { |
if (kInvalidHandle == child_process_) |
return false; |
return 0 != TerminateProcess(child_process_, 9); |
// 9 is the exit code for the child_process_. The value is actually not |
// material, since (currently) the launcher does not collect/report it. |
-#else |
- return false; |
-#endif |
} |
void PluginSelLdrLocator::GetDirectory(char* buffer, size_t len) { |