summaryrefslogtreecommitdiffstats
path: root/chrome/tools
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-30 23:56:18 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-30 23:56:18 +0000
commitb969648e443de8c767d7e2f6b34861b4a1ee3eec (patch)
treeb41dea85b620d7664038e2583614745bc4be6fae /chrome/tools
parentf0a94b593178cfe95dd16424cca6a0144de0d440 (diff)
downloadchromium_src-b969648e443de8c767d7e2f6b34861b4a1ee3eec.zip
chromium_src-b969648e443de8c767d7e2f6b34861b4a1ee3eec.tar.gz
chromium_src-b969648e443de8c767d7e2f6b34861b4a1ee3eec.tar.bz2
windows: remove PathService::Get() that uses wstrings
This just required fixing the remaining callers. BUG=24672 Review URL: http://codereview.chromium.org/5356008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67783 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools')
-rw-r--r--chrome/tools/crash_service/crash_service.cc21
-rw-r--r--chrome/tools/crash_service/crash_service.h7
2 files changed, 13 insertions, 15 deletions
diff --git a/chrome/tools/crash_service/crash_service.cc b/chrome/tools/crash_service/crash_service.cc
index 16cee48..4697e92 100644
--- a/chrome/tools/crash_service/crash_service.cc
+++ b/chrome/tools/crash_service/crash_service.cc
@@ -173,22 +173,23 @@ bool CrashService::Initialize(const std::wstring& command_line) {
using google_breakpad::CrashGenerationServer;
const wchar_t* pipe_name = kTestPipeName;
- std::wstring dumps_path;
int max_reports = -1;
// The checkpoint file allows CrashReportSender to enforce the the maximum
// reports per day quota. Does not seem to serve any other purpose.
- std::wstring checkpoint_path = report_path_;
- file_util::AppendToPath(&checkpoint_path, kCheckPointFile);
+ FilePath checkpoint_path = report_path_.Append(kCheckPointFile);
// The dumps path is typically : '<user profile>\Local settings\
// Application data\Goggle\Chrome\Crash Reports' and the report path is
// Application data\Google\Chrome\Reported Crashes.txt
- if (!PathService::Get(chrome::DIR_USER_DATA, &report_path_)) {
+ FilePath user_data_dir;
+ if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
LOG(ERROR) << "could not get DIR_USER_DATA";
return false;
}
- file_util::AppendToPath(&report_path_, chrome::kCrashReportLog);
+ report_path_ = user_data_dir.Append(chrome::kCrashReportLog);
+
+ FilePath dumps_path;
if (!PathService::Get(chrome::DIR_CRASH_DUMPS, &dumps_path)) {
LOG(ERROR) << "could not get DIR_CRASH_DUMPS";
return false;
@@ -202,7 +203,7 @@ bool CrashService::Initialize(const std::wstring& command_line) {
if (max_reports > 0) {
// Create the http sender object.
- sender_ = new CrashReportSender(checkpoint_path);
+ sender_ = new CrashReportSender(checkpoint_path.value());
if (!sender_) {
LOG(ERROR) << "could not create sender";
return false;
@@ -231,7 +232,7 @@ bool CrashService::Initialize(const std::wstring& command_line) {
&CrashService::OnClientConnected, this,
&CrashService::OnClientDumpRequest, this,
&CrashService::OnClientExited, this,
- true, &dumps_path);
+ true, &dumps_path.value());
if (!dumper_) {
LOG(ERROR) << "could not create dumper";
@@ -254,11 +255,11 @@ bool CrashService::Initialize(const std::wstring& command_line) {
// Log basic information.
VLOG(1) << "pipe name is " << pipe_name
- << "\ndumps at " << dumps_path
- << "\nreports at " << report_path_;
+ << "\ndumps at " << dumps_path.value()
+ << "\nreports at " << report_path_.value();
if (sender_) {
- VLOG(1) << "checkpoint is " << checkpoint_path
+ VLOG(1) << "checkpoint is " << checkpoint_path.value()
<< "\nserver is " << kCrashReportURL
<< "\nmaximum " << sender_->max_reports_per_day() << " reports/day"
<< "\nreporter is " << reporter_tag_;
diff --git a/chrome/tools/crash_service/crash_service.h b/chrome/tools/crash_service/crash_service.h
index f9526f0..2d4c472 100644
--- a/chrome/tools/crash_service/crash_service.h
+++ b/chrome/tools/crash_service/crash_service.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/file_path.h"
#include "base/lock.h"
namespace google_breakpad {
@@ -56,10 +57,6 @@ class CrashService {
// The default tag if not specified is 'crash svc'.
static const char kReporterTag[];
- // Returns the actual report path.
- std::wstring report_path() const {
- return report_path_;
- }
// Returns number of crash dumps handled.
int requests_handled() const {
return requests_handled_;
@@ -103,7 +100,7 @@ class CrashService {
google_breakpad::CrashReportSender* sender_;
// the path to dumps and logs directory.
- std::wstring report_path_;
+ FilePath report_path_;
// the extra tag sent to the server with each dump.
std::wstring reporter_tag_;