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 <userenv.h> // NOLINT | 7 #include <userenv.h> // NOLINT |
8 | 8 |
9 #include "chrome/app/main_dll_loader_win.h" | 9 #include "chrome/app/main_dll_loader_win.h" |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "chrome/common/chrome_paths.h" | 37 #include "chrome/common/chrome_paths.h" |
38 #include "chrome/common/chrome_result_codes.h" | 38 #include "chrome/common/chrome_result_codes.h" |
39 #include "chrome/common/chrome_switches.h" | 39 #include "chrome/common/chrome_switches.h" |
40 #include "chrome/common/env_vars.h" | 40 #include "chrome/common/env_vars.h" |
41 #include "chrome/installer/util/browser_distribution.h" | 41 #include "chrome/installer/util/browser_distribution.h" |
42 #include "chrome/installer/util/google_update_constants.h" | 42 #include "chrome/installer/util/google_update_constants.h" |
43 #include "chrome/installer/util/google_update_settings.h" | 43 #include "chrome/installer/util/google_update_settings.h" |
44 #include "chrome/installer/util/install_util.h" | 44 #include "chrome/installer/util/install_util.h" |
45 #include "chrome/installer/util/module_util_win.h" | 45 #include "chrome/installer/util/module_util_win.h" |
46 #include "chrome/installer/util/util_constants.h" | 46 #include "chrome/installer/util/util_constants.h" |
47 #include "components/crash/content/app/crash_keys_win.h" | |
48 #include "components/crash/content/app/crash_reporter_client.h" | 47 #include "components/crash/content/app/crash_reporter_client.h" |
49 #include "components/crash/content/app/crashpad.h" | 48 #include "components/crash/content/app/crashpad.h" |
50 #include "components/startup_metric_utils/browser/pre_read_field_trial_utils_win
.h" | 49 #include "components/startup_metric_utils/browser/pre_read_field_trial_utils_win
.h" |
51 #include "content/public/app/sandbox_helper_win.h" | 50 #include "content/public/app/sandbox_helper_win.h" |
52 #include "content/public/common/content_switches.h" | 51 #include "content/public/common/content_switches.h" |
53 #include "sandbox/win/src/sandbox.h" | 52 #include "sandbox/win/src/sandbox.h" |
54 | 53 |
55 namespace { | 54 namespace { |
56 // The entry point signature of chrome.dll. | 55 // The entry point signature of chrome.dll. |
57 typedef int (*DLL_MAIN)(HINSTANCE, sandbox::SandboxInterfaceInfo*); | 56 typedef int (*DLL_MAIN)(HINSTANCE, sandbox::SandboxInterfaceInfo*); |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 } else { | 343 } else { |
345 // TODO(scottmg): Point this at the common global one when it's | 344 // TODO(scottmg): Point this at the common global one when it's |
346 // moved back into the .exe. http://crbug.com/546288. | 345 // moved back into the .exe. http://crbug.com/546288. |
347 ChromeCrashReporterClient chrome_crash_client; | 346 ChromeCrashReporterClient chrome_crash_client; |
348 bool is_per_user_install = chrome_crash_client.GetIsPerUserInstall( | 347 bool is_per_user_install = chrome_crash_client.GetIsPerUserInstall( |
349 base::FilePath(exe_path)); | 348 base::FilePath(exe_path)); |
350 if (chrome_crash_client.GetShouldDumpLargerDumps( | 349 if (chrome_crash_client.GetShouldDumpLargerDumps( |
351 is_per_user_install)) { | 350 is_per_user_install)) { |
352 minidump_type = kasko::api::LARGER_DUMP_TYPE; | 351 minidump_type = kasko::api::LARGER_DUMP_TYPE; |
353 } | 352 } |
354 | |
355 // TODO(scottmg): http://crbug.com/564329 Breakpad is no longer | |
356 // initialized. For now, initialize the CustomInfoEntries here so | |
357 // Kasko can pull them out. | |
358 static breakpad::CrashKeysWin crash_keys_win; | |
359 crash_keys_win.GetCustomInfo( | |
360 exe_path.value(), base::UTF8ToUTF16(process_type), | |
361 GetProfileType(), base::CommandLine::ForCurrentProcess(), | |
362 &chrome_crash_client); | |
363 } | 353 } |
364 | 354 |
365 kasko_client_.reset( | 355 kasko_client_.reset( |
366 new KaskoClient(chrome_watcher_client_.get(), minidump_type)); | 356 new KaskoClient(chrome_watcher_client_.get(), minidump_type)); |
367 #endif // KASKO | 357 #endif // KASKO |
368 } | 358 } |
369 } | 359 } |
370 } | 360 } |
371 } else { | 361 } else { |
372 // Set non-browser processes up to be killed by the system after the browser | 362 // Set non-browser processes up to be killed by the system after the browser |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 } | 396 } |
407 }; | 397 }; |
408 | 398 |
409 MainDllLoader* MakeMainDllLoader() { | 399 MainDllLoader* MakeMainDllLoader() { |
410 #if defined(GOOGLE_CHROME_BUILD) | 400 #if defined(GOOGLE_CHROME_BUILD) |
411 return new ChromeDllLoader(); | 401 return new ChromeDllLoader(); |
412 #else | 402 #else |
413 return new ChromiumDllLoader(); | 403 return new ChromiumDllLoader(); |
414 #endif | 404 #endif |
415 } | 405 } |
OLD | NEW |