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

Side by Side Diff: chrome/tools/crash_service/main.cc

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/perf/generate_profile.cc ('k') | chrome/utility/extensions/unpacker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <windows.h> 5 #include <windows.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <tchar.h> 7 #include <tchar.h>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "chrome/common/chrome_constants.h" 14 #include "chrome/common/chrome_constants.h"
15 #include "chrome/common/chrome_paths.h" 15 #include "chrome/common/chrome_paths.h"
16 #include "components/breakpad/tools/crash_service.h" 16 #include "components/breakpad/tools/crash_service.h"
17 17
18 namespace { 18 namespace {
19 19
20 const wchar_t kStandardLogFile[] = L"operation_log.txt"; 20 const wchar_t kStandardLogFile[] = L"operation_log.txt";
21 21
22 bool GetCrashServiceDirectory(base::FilePath* dir) { 22 bool GetCrashServiceDirectory(base::FilePath* dir) {
23 base::FilePath temp_dir; 23 base::FilePath temp_dir;
24 if (!base::GetTempDir(&temp_dir)) 24 if (!base::GetTempDir(&temp_dir))
25 return false; 25 return false;
26 temp_dir = temp_dir.Append(L"chrome_crashes"); 26 temp_dir = temp_dir.Append(L"chrome_crashes");
27 if (!base::PathExists(temp_dir)) { 27 if (!base::PathExists(temp_dir)) {
28 if (!file_util::CreateDirectory(temp_dir)) 28 if (!base::CreateDirectory(temp_dir))
29 return false; 29 return false;
30 } 30 }
31 *dir = temp_dir; 31 *dir = temp_dir;
32 return true; 32 return true;
33 } 33 }
34 34
35 } // namespace. 35 } // namespace.
36 36
37 int __stdcall wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd_line, 37 int __stdcall wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd_line,
38 int show_mode) { 38 int show_mode) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 return 1; 70 return 1;
71 71
72 VLOG(1) << "ready to process crash requests"; 72 VLOG(1) << "ready to process crash requests";
73 73
74 // Enter the message loop. 74 // Enter the message loop.
75 int retv = crash_service.ProcessingLoop(); 75 int retv = crash_service.ProcessingLoop();
76 // Time to exit. 76 // Time to exit.
77 VLOG(1) << "session end. return code is " << retv; 77 VLOG(1) << "session end. return code is " << retv;
78 return retv; 78 return retv;
79 } 79 }
OLDNEW
« no previous file with comments | « chrome/test/perf/generate_profile.cc ('k') | chrome/utility/extensions/unpacker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698