diff options
author | gregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-30 00:29:54 +0000 |
---|---|---|
committer | gregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-30 00:29:54 +0000 |
commit | 0b6e0a2ba1c90550d2dc4e33e2d0d282e09ebfdb (patch) | |
tree | 7e0c2f17e82dd477294d26a51051bee13c4dc5bb /chrome/app | |
parent | 732a0f086db4bfdfd29749c3a500af0405934b6f (diff) | |
download | chromium_src-0b6e0a2ba1c90550d2dc4e33e2d0d282e09ebfdb.zip chromium_src-0b6e0a2ba1c90550d2dc4e33e2d0d282e09ebfdb.tar.gz chromium_src-0b6e0a2ba1c90550d2dc4e33e2d0d282e09ebfdb.tar.bz2 |
Revert 37578 - Implement the broker process that launches NaCl loader processes on 64bit Windows systems.
BUG=28176
TEST=none
Review URL: http://codereview.chromium.org/542030
TBR=gregoryd@google.com
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r-- | chrome/app/chrome_dll_main.cc | 10 | ||||
-rw-r--r-- | chrome/app/client_util.cc | 16 | ||||
-rw-r--r-- | chrome/app/dummy_main_functions.cc | 4 |
3 files changed, 7 insertions, 23 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index 1603d32..1e3cb83 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -93,7 +93,7 @@ extern int NaClMain(const MainFunctionParams&); extern int UtilityMain(const MainFunctionParams&); extern int ProfileImportMain(const MainFunctionParams&); extern int ZygoteMain(const MainFunctionParams&); -#if defined(_WIN64) +#ifdef NACL_WIN64 extern int NaClBrokerMain(const MainFunctionParams&); #endif @@ -261,7 +261,7 @@ static void AdjustLinuxOOMScore(const std::string& process_type) { } else if (process_type == switches::kProfileImportProcess) { NOTIMPLEMENTED(); #ifndef DISABLE_NACL - } else if (process_type == switches::kNaClLoaderProcess) { + } else if (process_type == switches::kNaClProcess) { score = kPluginScore; #endif } else if (process_type == switches::kZygoteProcess || @@ -686,13 +686,9 @@ int ChromeMain(int argc, char** argv) { } else if (process_type == switches::kWorkerProcess) { rv = WorkerMain(main_params); #ifndef DISABLE_NACL - } else if (process_type == switches::kNaClLoaderProcess) { + } else if (process_type == switches::kNaClProcess) { rv = NaClMain(main_params); #endif -#ifdef _WIN64 // The broker process is used only on Win64. - } else if (process_type == switches::kNaClBrokerProcess) { - rv = NaClBrokerMain(main_params); -#endif } else if (process_type == switches::kZygoteProcess) { #if defined(OS_LINUX) if (ZygoteMain(main_params)) { diff --git a/chrome/app/client_util.cc b/chrome/app/client_util.cc index a4bc50b..993f468 100644 --- a/chrome/app/client_util.cc +++ b/chrome/app/client_util.cc @@ -7,7 +7,6 @@ #include "chrome/app/breakpad_win.h" #include "chrome/app/client_util.h" -#include "chrome/common/chrome_switches.h" #include "chrome/common/result_codes.h" #include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/install_util.h" @@ -84,22 +83,7 @@ bool EnvQueryStr(const wchar_t* key_name, std::wstring* value) { // value not being null to dermine if this path contains a valid dll. HMODULE LoadChromeWithDirectory(std::wstring* dir) { ::SetCurrentDirectoryW(dir->c_str()); -#ifdef _WIN64 - const CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); - if ((cmd_line.GetSwitchValueASCII(switches::kProcessType) == - switches::kNaClBrokerProcess) || - (cmd_line.GetSwitchValueASCII(switches::kProcessType) == - switches::kNaClLoaderProcess)) { - // Load the 64-bit DLL when running in a 64-bit process. - dir->append(installer_util::kChromeNaCl64Dll); - } else { - // Only NaCl broker and loader can be launched as Win64 processes. - NOTREACHED(); - return NULL; - } -#else dir->append(installer_util::kChromeDll); -#endif return ::LoadLibraryExW(dir->c_str(), NULL, LOAD_WITH_ALTERED_SEARCH_PATH); } diff --git a/chrome/app/dummy_main_functions.cc b/chrome/app/dummy_main_functions.cc index c8b7c5e..192720e 100644 --- a/chrome/app/dummy_main_functions.cc +++ b/chrome/app/dummy_main_functions.cc @@ -35,6 +35,10 @@ int ZygoteMain(const MainFunctionParams& parameters) { return ResultCodes::BAD_PROCESS_TYPE; } +int NaClBrokerMain(const MainFunctionParams& parameters) { + return ResultCodes::BAD_PROCESS_TYPE; +} + int DiagnosticsMain(const CommandLine& command_line) { return 1; } |