Chromium Code Reviews| 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 15 matching lines...) Expand all Loading... | |
| 26 #include "base/trace_event/trace_event.h" | 26 #include "base/trace_event/trace_event.h" |
| 27 #include "base/win/scoped_handle.h" | 27 #include "base/win/scoped_handle.h" |
| 28 #include "base/win/windows_version.h" | 28 #include "base/win/windows_version.h" |
| 29 #include "chrome/app/chrome_crash_reporter_client.h" | 29 #include "chrome/app/chrome_crash_reporter_client.h" |
| 30 #include "chrome/app/chrome_watcher_client_win.h" | 30 #include "chrome/app/chrome_watcher_client_win.h" |
| 31 #include "chrome/app/chrome_watcher_command_line_win.h" | 31 #include "chrome/app/chrome_watcher_command_line_win.h" |
| 32 #include "chrome/app/file_pre_reader_win.h" | 32 #include "chrome/app/file_pre_reader_win.h" |
| 33 #include "chrome/app/kasko_client.h" | 33 #include "chrome/app/kasko_client.h" |
| 34 #include "chrome/chrome_watcher/chrome_watcher_main_api.h" | 34 #include "chrome/chrome_watcher/chrome_watcher_main_api.h" |
| 35 #include "chrome/common/chrome_constants.h" | 35 #include "chrome/common/chrome_constants.h" |
| 36 #include "chrome/common/chrome_constants_util_win.h" | |
| 36 #include "chrome/common/chrome_paths.h" | 37 #include "chrome/common/chrome_paths.h" |
| 37 #include "chrome/common/chrome_result_codes.h" | 38 #include "chrome/common/chrome_result_codes.h" |
|
gab
2016/03/09 20:29:35
Interesting, another uncaught violation: "chrome/c
| |
| 38 #include "chrome/common/chrome_switches.h" | 39 #include "chrome/common/chrome_switches.h" |
| 39 #include "chrome/installer/util/google_update_constants.h" | 40 #include "chrome/installer/util/google_update_constants.h" |
| 40 #include "chrome/installer/util/google_update_settings.h" | 41 #include "chrome/installer/util/google_update_settings.h" |
| 41 #include "chrome/installer/util/install_util.h" | 42 #include "chrome/installer/util/install_util.h" |
| 42 #include "chrome/installer/util/module_util_win.h" | 43 #include "chrome/installer/util/module_util_win.h" |
| 43 #include "chrome/installer/util/util_constants.h" | 44 #include "chrome/installer/util/util_constants.h" |
| 44 #include "components/crash/content/app/crash_reporter_client.h" | 45 #include "components/crash/content/app/crash_reporter_client.h" |
| 45 #include "components/crash/content/app/crashpad.h" | 46 #include "components/crash/content/app/crashpad.h" |
| 46 #include "components/startup_metric_utils/common/pre_read_field_trial_utils_win. h" | 47 #include "components/startup_metric_utils/common/pre_read_field_trial_utils_win. h" |
| 47 #include "content/public/app/sandbox_helper_win.h" | 48 #include "content/public/app/sandbox_helper_win.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 | 158 |
| 158 // Intentionally leaked. | 159 // Intentionally leaked. |
| 159 HMODULE watcher_dll = Load(&file); | 160 HMODULE watcher_dll = Load(&file); |
| 160 if (!watcher_dll) | 161 if (!watcher_dll) |
| 161 return chrome::RESULT_CODE_MISSING_DATA; | 162 return chrome::RESULT_CODE_MISSING_DATA; |
| 162 | 163 |
| 163 ChromeWatcherMainFunction watcher_main = | 164 ChromeWatcherMainFunction watcher_main = |
| 164 reinterpret_cast<ChromeWatcherMainFunction>( | 165 reinterpret_cast<ChromeWatcherMainFunction>( |
| 165 ::GetProcAddress(watcher_dll, kChromeWatcherDLLEntrypoint)); | 166 ::GetProcAddress(watcher_dll, kChromeWatcherDLLEntrypoint)); |
| 166 return watcher_main( | 167 return watcher_main( |
| 167 chrome::kBrowserExitCodesRegistryPath, parent_process.Take(), | 168 chrome::GetBrowserExitCodesRegistryPath().c_str(), |
| 168 main_thread_id, on_initialized_event.Take(), | 169 parent_process.Take(), main_thread_id, on_initialized_event.Take(), |
| 169 watcher_data_directory.value().c_str(), channel_name.c_str()); | 170 watcher_data_directory.value().c_str(), channel_name.c_str()); |
| 170 } | 171 } |
| 171 | 172 |
| 172 // Initialize the sandbox services. | 173 // Initialize the sandbox services. |
| 173 sandbox::SandboxInterfaceInfo sandbox_info = {0}; | 174 sandbox::SandboxInterfaceInfo sandbox_info = {0}; |
| 174 content::InitializeSandboxInfo(&sandbox_info); | 175 content::InitializeSandboxInfo(&sandbox_info); |
| 175 | 176 |
| 176 dll_ = Load(&file); | 177 dll_ = Load(&file); |
| 177 if (!dll_) | 178 if (!dll_) |
| 178 return chrome::RESULT_CODE_MISSING_DATA; | 179 return chrome::RESULT_CODE_MISSING_DATA; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 296 } | 297 } |
| 297 }; | 298 }; |
| 298 | 299 |
| 299 MainDllLoader* MakeMainDllLoader() { | 300 MainDllLoader* MakeMainDllLoader() { |
| 300 #if defined(GOOGLE_CHROME_BUILD) | 301 #if defined(GOOGLE_CHROME_BUILD) |
| 301 return new ChromeDllLoader(); | 302 return new ChromeDllLoader(); |
| 302 #else | 303 #else |
| 303 return new ChromiumDllLoader(); | 304 return new ChromiumDllLoader(); |
| 304 #endif | 305 #endif |
| 305 } | 306 } |
| OLD | NEW |