| 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 <windows.h> // NOLINT | 5 #include <windows.h> // NOLINT |
| 6 #include <shlwapi.h> // NOLINT | 6 #include <shlwapi.h> // NOLINT |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <userenv.h> // NOLINT | 8 #include <userenv.h> // NOLINT |
| 9 | 9 |
| 10 #include "chrome/app/main_dll_loader_win.h" | 10 #include "chrome/app/main_dll_loader_win.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "base/trace_event/trace_event.h" | 28 #include "base/trace_event/trace_event.h" |
| 29 #include "base/win/scoped_handle.h" | 29 #include "base/win/scoped_handle.h" |
| 30 #include "base/win/windows_version.h" | 30 #include "base/win/windows_version.h" |
| 31 #include "chrome/app/chrome_crash_reporter_client.h" | 31 #include "chrome/app/chrome_crash_reporter_client.h" |
| 32 #include "chrome/app/chrome_watcher_client_win.h" | 32 #include "chrome/app/chrome_watcher_client_win.h" |
| 33 #include "chrome/app/chrome_watcher_command_line_win.h" | 33 #include "chrome/app/chrome_watcher_command_line_win.h" |
| 34 #include "chrome/app/file_pre_reader_win.h" | 34 #include "chrome/app/file_pre_reader_win.h" |
| 35 #include "chrome/app/kasko_client.h" | 35 #include "chrome/app/kasko_client.h" |
| 36 #include "chrome/chrome_watcher/chrome_watcher_main_api.h" | 36 #include "chrome/chrome_watcher/chrome_watcher_main_api.h" |
| 37 #include "chrome/common/chrome_constants.h" | 37 #include "chrome/common/chrome_constants.h" |
| 38 #include "chrome/common/chrome_constants_util_win.h" |
| 38 #include "chrome/common/chrome_paths.h" | 39 #include "chrome/common/chrome_paths.h" |
| 39 #include "chrome/common/chrome_result_codes.h" | 40 #include "chrome/common/chrome_result_codes.h" |
| 40 #include "chrome/common/chrome_switches.h" | 41 #include "chrome/common/chrome_switches.h" |
| 41 #include "chrome/common/env_vars.h" | 42 #include "chrome/common/env_vars.h" |
| 42 #include "chrome/installer/util/google_update_constants.h" | 43 #include "chrome/installer/util/google_update_constants.h" |
| 43 #include "chrome/installer/util/google_update_settings.h" | 44 #include "chrome/installer/util/google_update_settings.h" |
| 44 #include "chrome/installer/util/install_util.h" | 45 #include "chrome/installer/util/install_util.h" |
| 45 #include "chrome/installer/util/module_util_win.h" | 46 #include "chrome/installer/util/module_util_win.h" |
| 46 #include "chrome/installer/util/util_constants.h" | 47 #include "chrome/installer/util/util_constants.h" |
| 47 #include "components/crash/content/app/crash_reporter_client.h" | 48 #include "components/crash/content/app/crash_reporter_client.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 221 |
| 221 // Intentionally leaked. | 222 // Intentionally leaked. |
| 222 HMODULE watcher_dll = Load(&version, &file); | 223 HMODULE watcher_dll = Load(&version, &file); |
| 223 if (!watcher_dll) | 224 if (!watcher_dll) |
| 224 return chrome::RESULT_CODE_MISSING_DATA; | 225 return chrome::RESULT_CODE_MISSING_DATA; |
| 225 | 226 |
| 226 ChromeWatcherMainFunction watcher_main = | 227 ChromeWatcherMainFunction watcher_main = |
| 227 reinterpret_cast<ChromeWatcherMainFunction>( | 228 reinterpret_cast<ChromeWatcherMainFunction>( |
| 228 ::GetProcAddress(watcher_dll, kChromeWatcherDLLEntrypoint)); | 229 ::GetProcAddress(watcher_dll, kChromeWatcherDLLEntrypoint)); |
| 229 return watcher_main( | 230 return watcher_main( |
| 230 chrome::kBrowserExitCodesRegistryPath, parent_process.Take(), | 231 chrome::GetBrowserExitCodesRegistryPath(), parent_process.Take(), |
| 231 main_thread_id, on_initialized_event.Take(), | 232 main_thread_id, on_initialized_event.Take(), |
| 232 watcher_data_directory.value().c_str(), channel_name.c_str()); | 233 watcher_data_directory.value().c_str(), channel_name.c_str()); |
| 233 } | 234 } |
| 234 | 235 |
| 235 // Initialize the sandbox services. | 236 // Initialize the sandbox services. |
| 236 sandbox::SandboxInterfaceInfo sandbox_info = {0}; | 237 sandbox::SandboxInterfaceInfo sandbox_info = {0}; |
| 237 content::InitializeSandboxInfo(&sandbox_info); | 238 content::InitializeSandboxInfo(&sandbox_info); |
| 238 | 239 |
| 239 dll_ = Load(&version, &file); | 240 dll_ = Load(&version, &file); |
| 240 if (!dll_) | 241 if (!dll_) |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 } | 363 } |
| 363 }; | 364 }; |
| 364 | 365 |
| 365 MainDllLoader* MakeMainDllLoader() { | 366 MainDllLoader* MakeMainDllLoader() { |
| 366 #if defined(GOOGLE_CHROME_BUILD) | 367 #if defined(GOOGLE_CHROME_BUILD) |
| 367 return new ChromeDllLoader(); | 368 return new ChromeDllLoader(); |
| 368 #else | 369 #else |
| 369 return new ChromiumDllLoader(); | 370 return new ChromiumDllLoader(); |
| 370 #endif | 371 #endif |
| 371 } | 372 } |
| OLD | NEW |