diff options
author | ivan.penkov@gmail.com <ivan.penkov@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-06-28 22:46:01 +0000 |
---|---|---|
committer | ivan.penkov@gmail.com <ivan.penkov@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-06-28 22:46:01 +0000 |
commit | 6de969a3040fa31ba60302c66613d1d2e6f5a730 (patch) | |
tree | aad9de34e00834709440f01cb0f54e315989490e /src/common/linux/tests | |
parent | Fix Android build of client library (diff) | |
download | breakpad-6de969a3040fa31ba60302c66613d1d2e6f5a730.tar.xz |
This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@974 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/linux/tests')
-rw-r--r-- | src/common/linux/tests/crash_generator.cc | 7 | ||||
-rw-r--r-- | src/common/linux/tests/crash_generator.h | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/common/linux/tests/crash_generator.cc b/src/common/linux/tests/crash_generator.cc index 59aced27..c78b793e 100644 --- a/src/common/linux/tests/crash_generator.cc +++ b/src/common/linux/tests/crash_generator.cc @@ -46,6 +46,7 @@ #include "common/linux/eintr_wrapper.h" #include "common/tests/auto_tempdir.h" #include "common/tests/file_utils.h" +#include "common/using_std_string.h" namespace { @@ -97,11 +98,11 @@ bool CrashGenerator::HasDefaultCorePattern() const { buffer_size == 5 && memcmp(buffer, "core", 4) == 0; } -std::string CrashGenerator::GetCoreFilePath() const { +string CrashGenerator::GetCoreFilePath() const { return temp_dir_.path() + "/core"; } -std::string CrashGenerator::GetDirectoryOfProcFilesCopy() const { +string CrashGenerator::GetDirectoryOfProcFilesCopy() const { return temp_dir_.path() + "/proc"; } @@ -170,7 +171,7 @@ bool CrashGenerator::CreateChildCrash( } if (SetCoreFileSizeLimit(kCoreSizeLimit)) { CreateThreadsInChildProcess(num_threads); - std::string proc_dir = GetDirectoryOfProcFilesCopy(); + string proc_dir = GetDirectoryOfProcFilesCopy(); if (mkdir(proc_dir.c_str(), 0755) == -1) { perror("CrashGenerator: Failed to create proc directory"); exit(1); diff --git a/src/common/linux/tests/crash_generator.h b/src/common/linux/tests/crash_generator.h index d05ce73d..7e2fcbf9 100644 --- a/src/common/linux/tests/crash_generator.h +++ b/src/common/linux/tests/crash_generator.h @@ -38,6 +38,7 @@ #include <string> #include "common/tests/auto_tempdir.h" +#include "common/using_std_string.h" namespace google_breakpad { @@ -59,10 +60,10 @@ class CrashGenerator { bool HasDefaultCorePattern() const; // Returns the expected path of the core dump file. - std::string GetCoreFilePath() const; + string GetCoreFilePath() const; // Returns the directory of a copy of proc files of the child process. - std::string GetDirectoryOfProcFilesCopy() const; + string GetDirectoryOfProcFilesCopy() const; // Creates a crash (and a core dump file) by creating a child process with // |num_threads| threads, and the terminating the child process by sending |