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

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

Issue 1481703002: win: Move Crashpad all into chrome.exe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix and rebase 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
« no previous file with comments | « chrome/test/base/chrome_test_launcher.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 "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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 std::string url = "https://clients2.google.com/cr/report"; 61 std::string url = "https://clients2.google.com/cr/report";
62 #else 62 #else
63 std::string url; 63 std::string url;
64 #endif 64 #endif
65 65
66 std::vector<std::string> arguments; 66 std::vector<std::string> arguments;
67 67
68 // In test binaries, use crashpad_handler directly. Otherwise, we launch 68 // In test binaries, use crashpad_handler directly. Otherwise, we launch
69 // chrome.exe with --type=crashpad-handler. 69 // chrome.exe with --type=crashpad-handler.
70 if (exe_file.BaseName().value() != FILE_PATH_LITERAL("chrome.exe")) { 70 if (exe_file.BaseName().value() != FILE_PATH_LITERAL("chrome.exe")) {
71 base::FilePath exe_dir; 71 base::FilePath exe_dir = exe_file.DirName();
72 CHECK(PathService::Get(base::DIR_EXE, &exe_dir));
73 exe_file = exe_dir.Append(FILE_PATH_LITERAL("crashpad_handler.exe")); 72 exe_file = exe_dir.Append(FILE_PATH_LITERAL("crashpad_handler.exe"));
74 } else { 73 } else {
75 arguments.push_back("--type=crashpad-handler"); 74 arguments.push_back("--type=crashpad-handler");
76 } 75 }
77 76
78 result = g_crashpad_client.Get().StartHandler( 77 result = g_crashpad_client.Get().StartHandler(
79 exe_file, database_path, url, process_annotations, arguments, false); 78 exe_file, database_path, url, process_annotations, arguments, false);
80 79
81 // If we're the browser, push the pipe name into the environment so child 80 // If we're the browser, push the pipe name into the environment so child
82 // processes can connect to it. If we inherited another crashpad_handler's 81 // processes can connect to it. If we inherited another crashpad_handler's
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 reinterpret_cast<ExceptionHandlerRecord*>(start); 192 reinterpret_cast<ExceptionHandlerRecord*>(start);
194 193
195 CHECK(RtlDeleteFunctionTable(&record->runtime_function)); 194 CHECK(RtlDeleteFunctionTable(&record->runtime_function));
196 } 195 }
197 #endif // ARCH_CPU_X86_64 196 #endif // ARCH_CPU_X86_64
198 197
199 } // extern "C" 198 } // extern "C"
200 199
201 } // namespace internal 200 } // namespace internal
202 } // namespace crash_reporter 201 } // namespace crash_reporter
OLDNEW
« no previous file with comments | « chrome/test/base/chrome_test_launcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698