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

Unified Diff: chrome/tools/crash_service/main.cc

Issue 26688006: Move CrashService class to breakpad component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/tools/crash_service/crash_service.cc ('k') | components/breakpad.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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";
« no previous file with comments | « chrome/tools/crash_service/crash_service.cc ('k') | components/breakpad.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698