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

Side by Side Diff: components/crash/content/app/crashpad_win.cc

Issue 2697513007: Windows CrashReporterClient cleanups in the wake of InstallDetails everywhere. (Closed)
Patch Set: sync to position 452911 Created 3 years, 9 months 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
« no previous file with comments | « components/crash/content/app/crash_reporter_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/crash/content/app/crashpad.h" 5 #include "components/crash/content/app/crashpad.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/debug/crash_logging.h" 9 #include "base/debug/crash_logging.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Allow the crash server to be overridden for testing. If the variable 87 // Allow the crash server to be overridden for testing. If the variable
88 // isn't present in the environment then the default URL will remain. 88 // isn't present in the environment then the default URL will remain.
89 env->GetVar(kServerUrlVar, &url); 89 env->GetVar(kServerUrlVar, &url);
90 90
91 wchar_t exe_file_path[MAX_PATH] = {}; 91 wchar_t exe_file_path[MAX_PATH] = {};
92 CHECK( 92 CHECK(
93 ::GetModuleFileName(nullptr, exe_file_path, arraysize(exe_file_path))); 93 ::GetModuleFileName(nullptr, exe_file_path, arraysize(exe_file_path)));
94 94
95 base::FilePath exe_file(exe_file_path); 95 base::FilePath exe_file(exe_file_path);
96 96
97 bool is_per_user_install = 97 if (crash_reporter_client->GetShouldDumpLargerDumps()) {
98 crash_reporter_client->GetIsPerUserInstall(exe_file.value());
99 if (crash_reporter_client->GetShouldDumpLargerDumps(is_per_user_install)) {
100 const uint32_t kIndirectMemoryLimit = 4 * 1024 * 1024; 98 const uint32_t kIndirectMemoryLimit = 4 * 1024 * 1024;
101 crashpad::CrashpadInfo::GetCrashpadInfo() 99 crashpad::CrashpadInfo::GetCrashpadInfo()
102 ->set_gather_indirectly_referenced_memory( 100 ->set_gather_indirectly_referenced_memory(
103 crashpad::TriState::kEnabled, kIndirectMemoryLimit); 101 crashpad::TriState::kEnabled, kIndirectMemoryLimit);
104 } 102 }
105 103
106 // If the handler is embedded in the binary (e.g. chrome, setup), we 104 // If the handler is embedded in the binary (e.g. chrome, setup), we
107 // reinvoke it with --type=crashpad-handler. Otherwise, we use the 105 // reinvoke it with --type=crashpad-handler. Otherwise, we use the
108 // standalone crashpad_handler.exe (for tests, etc.). 106 // standalone crashpad_handler.exe (for tests, etc.).
109 std::vector<std::string> arguments; 107 std::vector<std::string> arguments;
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 void __declspec(dllexport) __cdecl UnregisterNonABICompliantCodeRange( 357 void __declspec(dllexport) __cdecl UnregisterNonABICompliantCodeRange(
360 void* start) { 358 void* start) {
361 ExceptionHandlerRecord* record = 359 ExceptionHandlerRecord* record =
362 reinterpret_cast<ExceptionHandlerRecord*>(start); 360 reinterpret_cast<ExceptionHandlerRecord*>(start);
363 361
364 CHECK(RtlDeleteFunctionTable(&record->runtime_function)); 362 CHECK(RtlDeleteFunctionTable(&record->runtime_function));
365 } 363 }
366 #endif // ARCH_CPU_X86_64 364 #endif // ARCH_CPU_X86_64
367 365
368 } // extern "C" 366 } // extern "C"
OLDNEW
« no previous file with comments | « components/crash/content/app/crash_reporter_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698