1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
9 #include "base/at_exit.h"
10 #include "base/command_line.h"
11 #include "base/files/file_path.h"
12 #include "base/logging.h"
13 #include "components/crash/tools/crash_service.h"
15 int __stdcall
wWinMain(HINSTANCE instance
, HINSTANCE
, wchar_t* cmd_line
,
17 // Manages the destruction of singletons.
18 base::AtExitManager exit_manager
;
20 base::CommandLine::Init(0, NULL
);
23 logging::LoggingSettings settings
;
24 settings
.logging_dest
= logging::LOG_TO_SYSTEM_DEBUG_LOG
;
25 logging::InitLogging(settings
);
26 // Logging with pid, tid and timestamp.
27 logging::SetLogItems(true, true, true, false);
29 VLOG(1) << "session start. cmdline is [" << cmd_line
<< "]";
31 breakpad::CrashService crash_service
;
32 if (!crash_service
.Initialize(base::FilePath(), base::FilePath()))
35 VLOG(1) << "ready to process crash requests";
37 // Enter the message loop.
38 int retv
= crash_service
.ProcessingLoop();
40 VLOG(1) << "session end. return code is " << retv
;