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

Side by Side Diff: chrome/tools/crash_service/caps/main_win.cc

Issue 1858883004: Remove CAPS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gyp Created 4 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include <windows.h>
6
7 #include "base/at_exit.h"
8 #include "base/files/file_path.h"
9 #include "base/path_service.h"
10 #include "base/version.h"
11 #include "chrome/tools/crash_service/caps/exit_codes.h"
12 #include "chrome/tools/crash_service/caps/logger_win.h"
13 #include "chrome/tools/crash_service/caps/process_singleton_win.h"
14
15 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev, wchar_t*, int) {
16 base::AtExitManager at_exit_manager;
17 base::FilePath dir_exe;
18 if (!PathService::Get(base::DIR_EXE, &dir_exe))
19 return caps::EC_INIT_ERROR;
20
21 // What directory we write depends if we are being run from the actual
22 // location (a versioned directory) or from a build output directory.
23 base::Version version(dir_exe.BaseName().MaybeAsASCII());
24 auto data_path = version.IsValid() ? dir_exe.DirName() : dir_exe;
25
26 // Start logging.
27 caps::Logger logger(data_path);
28
29 // Check for an existing running instance.
30 caps::ProcessSingleton process_singleton;
31 if (process_singleton.other_instance())
32 return caps::EC_EXISTING_INSTANCE;
33
34 return caps::EC_NORMAL_EXIT;
35 }
36
OLDNEW
« no previous file with comments | « chrome/tools/crash_service/caps/logger_win.cc ('k') | chrome/tools/crash_service/caps/process_singleton_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698