| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/app/main_dll_loader_win.h" | 5 #include "chrome/app/main_dll_loader_win.h" |
| 6 | 6 |
| 7 #include <windows.h> // NOLINT | 7 #include <windows.h> // NOLINT |
| 8 #include <shlwapi.h> // NOLINT | 8 #include <shlwapi.h> // NOLINT |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 !InstallUtil::IsPerUserInstall(cmd_line.GetProgram())); | 147 !InstallUtil::IsPerUserInstall(cmd_line.GetProgram())); |
| 148 | 148 |
| 149 // Intentionally leaked. | 149 // Intentionally leaked. |
| 150 HMODULE watcher_dll = Load(&file); | 150 HMODULE watcher_dll = Load(&file); |
| 151 if (!watcher_dll) | 151 if (!watcher_dll) |
| 152 return chrome::RESULT_CODE_MISSING_DATA; | 152 return chrome::RESULT_CODE_MISSING_DATA; |
| 153 | 153 |
| 154 ChromeWatcherMainFunction watcher_main = | 154 ChromeWatcherMainFunction watcher_main = |
| 155 reinterpret_cast<ChromeWatcherMainFunction>( | 155 reinterpret_cast<ChromeWatcherMainFunction>( |
| 156 ::GetProcAddress(watcher_dll, kChromeWatcherDLLEntrypoint)); | 156 ::GetProcAddress(watcher_dll, kChromeWatcherDLLEntrypoint)); |
| 157 return watcher_main( | 157 return watcher_main(chrome::GetBrowserExitCodesRegistryPath().c_str(), |
| 158 chrome::GetBrowserExitCodesRegistryPath().c_str(), | 158 parent_process.Take(), main_thread_id, |
| 159 parent_process.Take(), main_thread_id, on_initialized_event.Take(), | 159 on_initialized_event.Take(), |
| 160 watcher_data_directory.value().c_str(), channel_name.c_str()); | 160 watcher_data_directory.value().c_str()); |
| 161 } | 161 } |
| 162 | 162 |
| 163 // Initialize the sandbox services. | 163 // Initialize the sandbox services. |
| 164 sandbox::SandboxInterfaceInfo sandbox_info = {0}; | 164 sandbox::SandboxInterfaceInfo sandbox_info = {0}; |
| 165 content::InitializeSandboxInfo(&sandbox_info); | 165 content::InitializeSandboxInfo(&sandbox_info); |
| 166 | 166 |
| 167 dll_ = Load(&file); | 167 dll_ = Load(&file); |
| 168 if (!dll_) | 168 if (!dll_) |
| 169 return chrome::RESULT_CODE_MISSING_DATA; | 169 return chrome::RESULT_CODE_MISSING_DATA; |
| 170 | 170 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 } | 254 } |
| 255 }; | 255 }; |
| 256 | 256 |
| 257 MainDllLoader* MakeMainDllLoader() { | 257 MainDllLoader* MakeMainDllLoader() { |
| 258 #if defined(GOOGLE_CHROME_BUILD) | 258 #if defined(GOOGLE_CHROME_BUILD) |
| 259 return new ChromeDllLoader(); | 259 return new ChromeDllLoader(); |
| 260 #else | 260 #else |
| 261 return new ChromiumDllLoader(); | 261 return new ChromiumDllLoader(); |
| 262 #endif | 262 #endif |
| 263 } | 263 } |
| OLD | NEW |