summaryrefslogtreecommitdiffstats
path: root/chrome/tools/crash_service
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-15 05:09:50 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-15 05:09:50 +0000
commit66ff7356a381d6c8c6c3272b095938408c4f3188 (patch)
tree9c3ae2fb0d55d1d9650a8071d1c80c557e7f0d93 /chrome/tools/crash_service
parent2c8088a4452c2c204237ba9f2f3706e7eeaaf35b (diff)
downloadchromium_src-66ff7356a381d6c8c6c3272b095938408c4f3188.zip
chromium_src-66ff7356a381d6c8c6c3272b095938408c4f3188.tar.gz
chromium_src-66ff7356a381d6c8c6c3272b095938408c4f3188.tar.bz2
Re-try r29078: Remove some deprecated file_util wstring functions.
With the previous patch, the try bots failed with mysterious messages, so I ignored them, patched it into my windows box and tested it there manually, and found no problems. As it turns out, the try failures were real :(. But nsylvain and I found the problem: the behavior of file_util::GetDirectoryFromPath() differs from DirName() when the path is empty (officially, GetDirectoryFromPath is not supposed to support non-absolute paths, but that is not enforced). Here is a green win try result: http://build.chromium.org/buildbot/try-server/builders/win/builds/3705 mac: http://build.chromium.org/buildbot/try-server/builders/mac/builds/3491 linux: http://build.chromium.org/buildbot/try-server/builders/linux/builds/3466 I also applied this patch locally in Windows to test that it doesn't break the chrome frame compile or tests, since that's not covered by the trybots yet. Review URL: http://codereview.chromium.org/271099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29094 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools/crash_service')
-rw-r--r--chrome/tools/crash_service/main.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/chrome/tools/crash_service/main.cc b/chrome/tools/crash_service/main.cc
index d6a1a20..cf6bab9 100644
--- a/chrome/tools/crash_service/main.cc
+++ b/chrome/tools/crash_service/main.cc
@@ -17,11 +17,11 @@ namespace {
const wchar_t kStandardLogFile[] = L"operation_log.txt";
-bool GetCrashServiceDirectory(std::wstring* dir) {
- std::wstring temp_dir;
+bool GetCrashServiceDirectory(FilePath* dir) {
+ FilePath temp_dir;
if (!file_util::GetTempDir(&temp_dir))
return false;
- file_util::AppendToPath(&temp_dir, L"chrome_crashes");
+ temp_dir = temp_dir.Append(L"chrome_crashes");
if (!file_util::PathExists(temp_dir)) {
if (!file_util::CreateDirectory(temp_dir))
return false;
@@ -40,19 +40,18 @@ int __stdcall wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd_line,
CommandLine::Init(0, NULL);
// We use/create a directory under the user's temp folder, for logging.
- std::wstring operating_dir;
+ FilePath operating_dir;
GetCrashServiceDirectory(&operating_dir);
- std::wstring log_file(operating_dir);
- file_util::AppendToPath(&log_file, kStandardLogFile);
+ FilePath log_file = operating_dir.Append(kStandardLogFile);
// Logging to a file with pid, tid and timestamp.
- logging::InitLogging(log_file.c_str(), logging::LOG_ONLY_TO_FILE,
+ logging::InitLogging(log_file.value().c_str(), logging::LOG_ONLY_TO_FILE,
logging::LOCK_LOG_FILE, logging::APPEND_TO_OLD_LOG_FILE);
logging::SetLogItems(true, true, true, false);
LOG(INFO) << "session start. cmdline is [" << cmd_line << "]";
- CrashService crash_service(operating_dir);
+ CrashService crash_service(operating_dir.ToWStringHack());
if (!crash_service.Initialize(::GetCommandLineW()))
return 1;