summaryrefslogtreecommitdiffstats
path: root/chrome/tools/crash_service/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/tools/crash_service/main.cc')
-rw-r--r--chrome/tools/crash_service/main.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/chrome/tools/crash_service/main.cc b/chrome/tools/crash_service/main.cc
index c4889c7..9fd9e87 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";