OLD | NEW |
---|---|
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 "base/environment.h" | 7 #include "base/environment.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/numerics/safe_conversions.h" | 10 #include "base/numerics/safe_conversions.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 | 68 |
69 #if defined(GOOGLE_CHROME_BUILD) | 69 #if defined(GOOGLE_CHROME_BUILD) |
70 std::string url = "https://clients2.google.com/cr/report"; | 70 std::string url = "https://clients2.google.com/cr/report"; |
71 #else | 71 #else |
72 std::string url; | 72 std::string url; |
73 #endif | 73 #endif |
74 | 74 |
75 base::FilePath exe_file; | 75 base::FilePath exe_file; |
76 CHECK(PathService::Get(base::FILE_EXE, &exe_file)); | 76 CHECK(PathService::Get(base::FILE_EXE, &exe_file)); |
77 | 77 |
78 bool is_per_user_install = | |
79 crash_reporter_client->GetIsPerUserInstall(exe_file); | |
80 if (crash_reporter_client->GetShouldDumpLargerDumps(is_per_user_install)) { | |
81 crashpad::CrashpadInfo::GetCrashpadInfo() | |
82 ->set_gather_indirectly_referenced_memory( | |
Mark Mentovai
2016/02/18 03:57:38
It occurs to me that maybe we should have made thi
| |
83 crashpad::TriState::kEnabled); | |
84 } | |
85 | |
78 // If the handler is embedded in the binary (e.g. chrome, setup), we | 86 // If the handler is embedded in the binary (e.g. chrome, setup), we |
79 // reinvoke it with --type=crashpad-handler. Otherwise, we use the | 87 // reinvoke it with --type=crashpad-handler. Otherwise, we use the |
80 // standalone crashpad_handler.exe (for tests, etc.). | 88 // standalone crashpad_handler.exe (for tests, etc.). |
81 std::vector<std::string> arguments; | 89 std::vector<std::string> arguments; |
82 if (embedded_handler) { | 90 if (embedded_handler) { |
83 arguments.push_back(std::string("--type=") + switches::kCrashpadHandler); | 91 arguments.push_back(std::string("--type=") + switches::kCrashpadHandler); |
84 | 92 |
85 if (startup_metric_utils::GetPreReadOptions().use_prefetch_argument) { | 93 if (startup_metric_utils::GetPreReadOptions().use_prefetch_argument) { |
86 // The prefetch argument added here has to be documented in | 94 // The prefetch argument added here has to be documented in |
87 // chrome_switches.cc, below the kPrefetchArgument* constants. A | 95 // chrome_switches.cc, below the kPrefetchArgument* constants. A |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
272 void __declspec(dllexport) __cdecl UnregisterNonABICompliantCodeRange( | 280 void __declspec(dllexport) __cdecl UnregisterNonABICompliantCodeRange( |
273 void* start) { | 281 void* start) { |
274 ExceptionHandlerRecord* record = | 282 ExceptionHandlerRecord* record = |
275 reinterpret_cast<ExceptionHandlerRecord*>(start); | 283 reinterpret_cast<ExceptionHandlerRecord*>(start); |
276 | 284 |
277 CHECK(RtlDeleteFunctionTable(&record->runtime_function)); | 285 CHECK(RtlDeleteFunctionTable(&record->runtime_function)); |
278 } | 286 } |
279 #endif // ARCH_CPU_X86_64 | 287 #endif // ARCH_CPU_X86_64 |
280 | 288 |
281 } // extern "C" | 289 } // extern "C" |
OLD | NEW |