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

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

Issue 1512463003: win: Get Kasko crash keys from Crashpad instead of Breakpad (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unnecessary initialization 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
(...skipping 25 matching lines...) Expand all
36 #include "chrome/common/chrome_paths.h" 36 #include "chrome/common/chrome_paths.h"
37 #include "chrome/common/chrome_result_codes.h" 37 #include "chrome/common/chrome_result_codes.h"
38 #include "chrome/common/chrome_switches.h" 38 #include "chrome/common/chrome_switches.h"
39 #include "chrome/common/env_vars.h" 39 #include "chrome/common/env_vars.h"
40 #include "chrome/installer/util/browser_distribution.h" 40 #include "chrome/installer/util/browser_distribution.h"
41 #include "chrome/installer/util/google_update_constants.h" 41 #include "chrome/installer/util/google_update_constants.h"
42 #include "chrome/installer/util/google_update_settings.h" 42 #include "chrome/installer/util/google_update_settings.h"
43 #include "chrome/installer/util/install_util.h" 43 #include "chrome/installer/util/install_util.h"
44 #include "chrome/installer/util/module_util_win.h" 44 #include "chrome/installer/util/module_util_win.h"
45 #include "chrome/installer/util/util_constants.h" 45 #include "chrome/installer/util/util_constants.h"
46 #include "components/crash/content/app/crash_keys_win.h"
47 #include "components/crash/content/app/crash_reporter_client.h" 46 #include "components/crash/content/app/crash_reporter_client.h"
48 #include "components/crash/content/app/crashpad.h" 47 #include "components/crash/content/app/crashpad.h"
49 #include "components/startup_metric_utils/browser/pre_read_field_trial_utils_win .h" 48 #include "components/startup_metric_utils/browser/pre_read_field_trial_utils_win .h"
50 #include "content/public/app/sandbox_helper_win.h" 49 #include "content/public/app/sandbox_helper_win.h"
51 #include "content/public/common/content_switches.h" 50 #include "content/public/common/content_switches.h"
52 #include "sandbox/win/src/sandbox.h" 51 #include "sandbox/win/src/sandbox.h"
53 52
54 namespace { 53 namespace {
55 // The entry point signature of chrome.dll. 54 // The entry point signature of chrome.dll.
56 typedef int (*DLL_MAIN)(HINSTANCE, sandbox::SandboxInterfaceInfo*); 55 typedef int (*DLL_MAIN)(HINSTANCE, sandbox::SandboxInterfaceInfo*);
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
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
336 // TODO(scottmg): http://crbug.com/564329 Breakpad is no longer
337 // initialized. For now, initialize the CustomInfoEntries here so
338 // Kasko can pull them out.
339 static breakpad::CrashKeysWin crash_keys_win;
340 crash_keys_win.GetCustomInfo(
341 exe_path.value(), base::UTF8ToUTF16(process_type),
342 GetProfileType(), base::CommandLine::ForCurrentProcess(),
343 &chrome_crash_client);
344 } 334 }
345 335
346 kasko_client_.reset( 336 kasko_client_.reset(
347 new KaskoClient(chrome_watcher_client_.get(), minidump_type)); 337 new KaskoClient(chrome_watcher_client_.get(), minidump_type));
348 #endif // KASKO 338 #endif // KASKO
349 } 339 }
350 } 340 }
351 } 341 }
352 } else { 342 } else {
353 // Set non-browser processes up to be killed by the system after the browser 343 // 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
387 } 377 }
388 }; 378 };
389 379
390 MainDllLoader* MakeMainDllLoader() { 380 MainDllLoader* MakeMainDllLoader() {
391 #if defined(GOOGLE_CHROME_BUILD) 381 #if defined(GOOGLE_CHROME_BUILD)
392 return new ChromeDllLoader(); 382 return new ChromeDllLoader();
393 #else 383 #else
394 return new ChromiumDllLoader(); 384 return new ChromiumDllLoader();
395 #endif 385 #endif
396 } 386 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698