Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: chrome/app/main_dll_loader_win.cc

Issue 1481703002: win: Move Crashpad all into chrome.exe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
11 #include "base/base_paths.h" 11 #include "base/base_paths.h"
12 #include "base/base_switches.h" 12 #include "base/base_switches.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/environment.h" 15 #include "base/environment.h"
16 #include "base/lazy_instance.h" 16 #include "base/lazy_instance.h"
17 #include "base/logging.h" 17 #include "base/logging.h"
18 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
19 #include "base/path_service.h" 19 #include "base/path_service.h"
20 #include "base/strings/string16.h" 20 #include "base/strings/string16.h"
21 #include "base/strings/string_util.h" 21 #include "base/strings/string_util.h"
22 #include "base/strings/stringprintf.h" 22 #include "base/strings/stringprintf.h"
23 #include "base/strings/utf_string_conversions.h" 23 #include "base/strings/utf_string_conversions.h"
24 #include "base/threading/platform_thread.h" 24 #include "base/threading/platform_thread.h"
25 #include "base/trace_event/trace_event.h" 25 #include "base/trace_event/trace_event.h"
26 #include "base/win/metro.h" 26 #include "base/win/metro.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"
30 #include "chrome/app/chrome_watcher_client_win.h" 29 #include "chrome/app/chrome_watcher_client_win.h"
31 #include "chrome/app/chrome_watcher_command_line_win.h" 30 #include "chrome/app/chrome_watcher_command_line_win.h"
32 #include "chrome/app/file_pre_reader_win.h" 31 #include "chrome/app/file_pre_reader_win.h"
33 #include "chrome/app/kasko_client.h" 32 #include "chrome/app/kasko_client.h"
34 #include "chrome/chrome_watcher/chrome_watcher_main_api.h" 33 #include "chrome/chrome_watcher/chrome_watcher_main_api.h"
35 #include "chrome/common/chrome_constants.h" 34 #include "chrome/common/chrome_constants.h"
36 #include "chrome/common/chrome_paths.h" 35 #include "chrome/common/chrome_paths.h"
37 #include "chrome/common/chrome_result_codes.h" 36 #include "chrome/common/chrome_result_codes.h"
38 #include "chrome/common/chrome_switches.h" 37 #include "chrome/common/chrome_switches.h"
39 #include "chrome/common/env_vars.h" 38 #include "chrome/common/env_vars.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 base::Bind(&GenerateChromeWatcherCommandLine, exe_path))); 317 base::Bind(&GenerateChromeWatcherCommandLine, exe_path)));
319 if (chrome_watcher_client_->LaunchWatcher()) { 318 if (chrome_watcher_client_->LaunchWatcher()) {
320 #if defined(KASKO) 319 #if defined(KASKO)
321 kasko::api::MinidumpType minidump_type = kasko::api::SMALL_DUMP_TYPE; 320 kasko::api::MinidumpType minidump_type = kasko::api::SMALL_DUMP_TYPE;
322 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 321 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
323 switches::kFullMemoryCrashReport)) { 322 switches::kFullMemoryCrashReport)) {
324 minidump_type = kasko::api::FULL_DUMP_TYPE; 323 minidump_type = kasko::api::FULL_DUMP_TYPE;
325 } else { 324 } else {
326 // TODO(scottmg): Point this at the common global one when it's 325 // TODO(scottmg): Point this at the common global one when it's
327 // moved back into the .exe. http://crbug.com/546288. 326 // moved back into the .exe. http://crbug.com/546288.
328 ChromeCrashReporterClient chrome_crash_client; 327 ChromeCrashReporterClient chrome_crash_client;
cpu_(ooo_6.6-7.5) 2015/12/03 20:53:27 does removing the #include break this deviant ...
scottmg 2015/12/03 21:06:23 Ah, good spotting! Thanks, done. The good thing i
329 bool is_per_user_install = chrome_crash_client.GetIsPerUserInstall( 328 bool is_per_user_install = chrome_crash_client.GetIsPerUserInstall(
330 base::FilePath(exe_path)); 329 base::FilePath(exe_path));
331 if (chrome_crash_client.GetShouldDumpLargerDumps( 330 if (chrome_crash_client.GetShouldDumpLargerDumps(
332 is_per_user_install)) { 331 is_per_user_install)) {
333 minidump_type = kasko::api::LARGER_DUMP_TYPE; 332 minidump_type = kasko::api::LARGER_DUMP_TYPE;
334 } 333 }
335 334
336 // TODO(scottmg): http://crbug.com/564329 Breakpad is no longer 335 // TODO(scottmg): http://crbug.com/564329 Breakpad is no longer
337 // initialized. For now, initialize the CustomInfoEntries here so 336 // initialized. For now, initialize the CustomInfoEntries here so
338 // Kasko can pull them out. 337 // Kasko can pull them out.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 } 386 }
388 }; 387 };
389 388
390 MainDllLoader* MakeMainDllLoader() { 389 MainDllLoader* MakeMainDllLoader() {
391 #if defined(GOOGLE_CHROME_BUILD) 390 #if defined(GOOGLE_CHROME_BUILD)
392 return new ChromeDllLoader(); 391 return new ChromeDllLoader();
393 #else 392 #else
394 return new ChromiumDllLoader(); 393 return new ChromiumDllLoader();
395 #endif 394 #endif
396 } 395 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698