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

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

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
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 "chrome/tools/crash_service/crash_service.h" 5 #include "chrome/tools/crash_service/crash_service.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <tchar.h> 9 #include <tchar.h>
10 10
11 #include "base/at_exit.h" 11 #include "base/at_exit.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/file_util.h" 13 #include "base/file_util.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 15
16 namespace { 16 namespace {
17 17
18 const wchar_t kStandardLogFile[] = L"operation_log.txt"; 18 const wchar_t kStandardLogFile[] = L"operation_log.txt";
19 19
20 bool GetCrashServiceDirectory(base::FilePath* dir) { 20 bool GetCrashServiceDirectory(base::FilePath* dir) {
21 base::FilePath temp_dir; 21 base::FilePath temp_dir;
22 if (!file_util::GetTempDir(&temp_dir)) 22 if (!file_util::GetTempDir(&temp_dir))
23 return false; 23 return false;
24 temp_dir = temp_dir.Append(L"chrome_crashes"); 24 temp_dir = temp_dir.Append(L"chrome_crashes");
25 if (!file_util::PathExists(temp_dir)) { 25 if (!base::PathExists(temp_dir)) {
26 if (!file_util::CreateDirectory(temp_dir)) 26 if (!file_util::CreateDirectory(temp_dir))
27 return false; 27 return false;
28 } 28 }
29 *dir = temp_dir; 29 *dir = temp_dir;
30 return true; 30 return true;
31 } 31 }
32 32
33 } // namespace. 33 } // namespace.
34 34
35 int __stdcall wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd_line, 35 int __stdcall wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd_line,
(...skipping 24 matching lines...) Expand all
60 return 1; 60 return 1;
61 61
62 VLOG(1) << "ready to process crash requests"; 62 VLOG(1) << "ready to process crash requests";
63 63
64 // Enter the message loop. 64 // Enter the message loop.
65 int retv = crash_service.ProcessingLoop(); 65 int retv = crash_service.ProcessingLoop();
66 // Time to exit. 66 // Time to exit.
67 VLOG(1) << "session end. return code is " << retv; 67 VLOG(1) << "session end. return code is " << retv;
68 return retv; 68 return retv;
69 } 69 }
OLDNEW
« no previous file with comments | « chrome/test/webdriver/webdriver_automation.cc ('k') | chrome/utility/chrome_content_utility_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698