Chromium Code Reviews| Index: chrome/app/main_dll_loader_win.cc |
| diff --git a/chrome/app/main_dll_loader_win.cc b/chrome/app/main_dll_loader_win.cc |
| index 8ef34fe42f220234682a6281e12314d55d69b303..7f124bf102524bd8ab3eb0fd152a4952450b0e27 100644 |
| --- a/chrome/app/main_dll_loader_win.cc |
| +++ b/chrome/app/main_dll_loader_win.cc |
| @@ -26,7 +26,6 @@ |
| #include "base/strings/utf_string_conversions.h" |
| #include "base/threading/platform_thread.h" |
| #include "base/trace_event/trace_event.h" |
| -#include "base/win/metro.h" |
| #include "base/win/scoped_handle.h" |
| #include "base/win/windows_version.h" |
| #include "chrome/app/chrome_crash_reporter_client.h" |
| @@ -166,7 +165,7 @@ std::wstring GetProfileType() { |
| //============================================================================= |
| MainDllLoader::MainDllLoader() |
| - : dll_(nullptr), metro_mode_(base::win::IsMetroProcess()) { |
| + : dll_(nullptr) { |
| } |
| MainDllLoader::~MainDllLoader() { |
| @@ -180,9 +179,7 @@ MainDllLoader::~MainDllLoader() { |
| // installed build. |
| HMODULE MainDllLoader::Load(base::string16* version, base::FilePath* module) { |
| const base::char16* dll_name = nullptr; |
| - if (metro_mode_) { |
| - dll_name = installer::kChromeMetroDll; |
| - } else if (process_type_ == "service" || process_type_.empty()) { |
| + if (process_type_ == "service" || process_type_.empty()) { |
| dll_name = installer::kChromeDll; |
| } else if (process_type_ == "watcher") { |
| dll_name = kChromeWatcherDll; |
| @@ -199,8 +196,7 @@ HMODULE MainDllLoader::Load(base::string16* version, base::FilePath* module) { |
| PLOG(ERROR) << "Cannot find module " << dll_name; |
| return nullptr; |
| } |
| - const bool pre_read = !metro_mode_; |
| - HMODULE dll = LoadModuleWithDirectory(*module, pre_read); |
| + HMODULE dll = LoadModuleWithDirectory(*module, true); |
|
sky
2016/01/12 03:40:51
Looks like this is the only caller of LoadModuleWi
scottmg
2016/01/12 18:24:16
Done.
|
| if (!dll) { |
| PLOG(ERROR) << "Failed to load Chrome DLL from " << module->value(); |
| return nullptr; |
| @@ -220,16 +216,6 @@ int MainDllLoader::Launch(HINSTANCE instance) { |
| base::string16 version; |
| base::FilePath file; |
| - if (metro_mode_) { |
| - HMODULE metro_dll = Load(&version, &file); |
| - if (!metro_dll) |
| - return chrome::RESULT_CODE_MISSING_DATA; |
| - |
| - InitMetro chrome_metro_main = |
| - reinterpret_cast<InitMetro>(::GetProcAddress(metro_dll, "InitMetro")); |
| - return chrome_metro_main(); |
| - } |
| - |
| if (process_type_ == "watcher") { |
| chrome::RegisterPathProvider(); |