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> | 5 #include <windows.h> |
6 #include <shlwapi.h> | 6 #include <shlwapi.h> |
7 | 7 |
8 #include "base/base_paths.h" | 8 #include "base/base_paths.h" |
9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "chrome/common/chrome_result_codes.h" | 35 #include "chrome/common/chrome_result_codes.h" |
36 #include "chrome/common/chrome_switches.h" | 36 #include "chrome/common/chrome_switches.h" |
37 #include "chrome/common/env_vars.h" | 37 #include "chrome/common/env_vars.h" |
38 #include "chrome/installer/util/google_update_constants.h" | 38 #include "chrome/installer/util/google_update_constants.h" |
39 #include "chrome/installer/util/google_update_settings.h" | 39 #include "chrome/installer/util/google_update_settings.h" |
40 #include "chrome/installer/util/install_util.h" | 40 #include "chrome/installer/util/install_util.h" |
41 #include "chrome/installer/util/util_constants.h" | 41 #include "chrome/installer/util/util_constants.h" |
42 #include "components/crash/content/app/breakpad_win.h" | 42 #include "components/crash/content/app/breakpad_win.h" |
43 #include "components/crash/content/app/crash_reporter_client.h" | 43 #include "components/crash/content/app/crash_reporter_client.h" |
44 #include "components/metrics/client_info.h" | 44 #include "components/metrics/client_info.h" |
45 #include "content/public/app/startup_helper_win.h" | 45 #include "content/public/app/sandbox_helper_win.h" |
46 #include "content/public/common/content_switches.h" | 46 #include "content/public/common/content_switches.h" |
47 #include "sandbox/win/src/sandbox.h" | 47 #include "sandbox/win/src/sandbox.h" |
48 | 48 |
49 namespace { | 49 namespace { |
50 // The entry point signature of chrome.dll. | 50 // The entry point signature of chrome.dll. |
51 typedef int (*DLL_MAIN)(HINSTANCE, sandbox::SandboxInterfaceInfo*); | 51 typedef int (*DLL_MAIN)(HINSTANCE, sandbox::SandboxInterfaceInfo*); |
52 | 52 |
53 typedef void (*RelaunchChromeBrowserWithNewCommandLineIfNeededFunc)(); | 53 typedef void (*RelaunchChromeBrowserWithNewCommandLineIfNeededFunc)(); |
54 | 54 |
55 base::LazyInstance<ChromeCrashReporterClient>::Leaky g_chrome_crash_client = | 55 base::LazyInstance<ChromeCrashReporterClient>::Leaky g_chrome_crash_client = |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 #if defined(KASKO) | 312 #if defined(KASKO) |
313 kasko::api::MinidumpType minidump_type = kasko::api::SMALL_DUMP_TYPE; | 313 kasko::api::MinidumpType minidump_type = kasko::api::SMALL_DUMP_TYPE; |
314 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 314 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
315 switches::kFullMemoryCrashReport)) { | 315 switches::kFullMemoryCrashReport)) { |
316 minidump_type = kasko::api::FULL_DUMP_TYPE; | 316 minidump_type = kasko::api::FULL_DUMP_TYPE; |
317 } else { | 317 } else { |
318 bool is_per_user_install = | 318 bool is_per_user_install = |
319 g_chrome_crash_client.Get().GetIsPerUserInstall( | 319 g_chrome_crash_client.Get().GetIsPerUserInstall( |
320 base::FilePath(exe_path)); | 320 base::FilePath(exe_path)); |
321 if (g_chrome_crash_client.Get().GetShouldDumpLargerDumps( | 321 if (g_chrome_crash_client.Get().GetShouldDumpLargerDumps( |
322 is_per_user_install)){ | 322 is_per_user_install)) { |
323 minidump_type = kasko::api::LARGER_DUMP_TYPE; | 323 minidump_type = kasko::api::LARGER_DUMP_TYPE; |
324 } | 324 } |
325 } | 325 } |
326 | 326 |
327 kasko_client_.reset( | 327 kasko_client_.reset( |
328 new KaskoClient(chrome_watcher_client_.get(), minidump_type)); | 328 new KaskoClient(chrome_watcher_client_.get(), minidump_type)); |
329 #endif // KASKO | 329 #endif // KASKO |
330 } | 330 } |
331 } | 331 } |
332 } | 332 } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 } | 368 } |
369 }; | 369 }; |
370 | 370 |
371 MainDllLoader* MakeMainDllLoader() { | 371 MainDllLoader* MakeMainDllLoader() { |
372 #if defined(GOOGLE_CHROME_BUILD) | 372 #if defined(GOOGLE_CHROME_BUILD) |
373 return new ChromeDllLoader(); | 373 return new ChromeDllLoader(); |
374 #else | 374 #else |
375 return new ChromiumDllLoader(); | 375 return new ChromiumDllLoader(); |
376 #endif | 376 #endif |
377 } | 377 } |
OLD | NEW |