Index: chrome/tools/crash_service/main.cc |
diff --git a/chrome/tools/crash_service/main.cc b/chrome/tools/crash_service/main.cc |
index c4889c71e978d5e8343233b3a55e677fc5b9eaed..9fd9e87c1f8caac5a8bbf3977acc2669bef4c073 100644 |
--- a/chrome/tools/crash_service/main.cc |
+++ b/chrome/tools/crash_service/main.cc |
@@ -2,8 +2,6 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/tools/crash_service/crash_service.h" |
- |
#include <windows.h> |
#include <stdlib.h> |
#include <tchar.h> |
@@ -12,6 +10,10 @@ |
#include "base/command_line.h" |
#include "base/file_util.h" |
#include "base/logging.h" |
+#include "base/path_service.h" |
+#include "chrome/common/chrome_constants.h" |
+#include "chrome/common/chrome_paths.h" |
+#include "components/breakpad/tools/crash_service.h" |
namespace { |
@@ -39,6 +41,8 @@ int __stdcall wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd_line, |
CommandLine::Init(0, NULL); |
+ chrome::RegisterPathProvider(); |
+ |
// We use/create a directory under the user's temp folder, for logging. |
base::FilePath operating_dir; |
GetCrashServiceDirectory(&operating_dir); |
@@ -55,8 +59,14 @@ int __stdcall wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd_line, |
VLOG(1) << "session start. cmdline is [" << cmd_line << "]"; |
- CrashService crash_service(operating_dir.value()); |
- if (!crash_service.Initialize(::GetCommandLineW())) |
+ base::FilePath dumps_path; |
+ if (!PathService::Get(chrome::DIR_CRASH_DUMPS, &dumps_path)) { |
+ LOG(ERROR) << "could not get DIR_CRASH_DUMPS"; |
+ return 1; |
+ } |
+ |
+ breakpad::CrashService crash_service; |
+ if (!crash_service.Initialize(operating_dir, dumps_path)) |
return 1; |
VLOG(1) << "ready to process crash requests"; |