diff options
author | tschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-02 18:50:48 +0000 |
---|---|---|
committer | tschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-02 18:50:48 +0000 |
commit | 407ae6f4b072612d00af8e6e79a3f64406b04029 (patch) | |
tree | 79728e4d80d3ce4de4744f3ca07dd3f0c36111e6 /o3d/breakpad | |
parent | a955868874c52f54e5ad1431cb0d377865257377 (diff) | |
download | chromium_src-407ae6f4b072612d00af8e6e79a3f64406b04029.zip chromium_src-407ae6f4b072612d00af8e6e79a3f64406b04029.tar.gz chromium_src-407ae6f4b072612d00af8e6e79a3f64406b04029.tar.bz2 |
Linux: Delete Breakpad::GenerateAndSendDumpFile because it causes a linker warning about mktemp(). It would be easy to fix the linker warning, but the function is never used so we might as well just remove it. If we want it in the future then we can add it back.
TEST=built on Linux, verified no linker warning
BUG=none
Review URL: http://codereview.chromium.org/3032049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54570 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/breakpad')
-rw-r--r-- | o3d/breakpad/linux/breakpad.cc | 51 | ||||
-rw-r--r-- | o3d/breakpad/linux/breakpad.h | 3 |
2 files changed, 0 insertions, 54 deletions
diff --git a/o3d/breakpad/linux/breakpad.cc b/o3d/breakpad/linux/breakpad.cc index fc285a9..4ef9bc3 100644 --- a/o3d/breakpad/linux/breakpad.cc +++ b/o3d/breakpad/linux/breakpad.cc @@ -55,8 +55,6 @@ static const std::string kBreakpadServer = static const std::string kBreakpadServer = "http://clients2.google.com/cr/report"; #endif -static const std::string kBreakpadDumpFilenameTemplate = - "/tmp/google-o3d-plugin-minidump-XXXXXX"; //TODO(zhurunz): Add/use decent path utility functions. @@ -130,55 +128,6 @@ bool Breakpad::SendDumpFile(const char* filename) { return uploader.Upload(); } -bool Breakpad::GenerateAndSendDumpFile( - const std::map<std::string, std::string>* extra_params) { - - // Create pipe. - int fds[2]; - if (0 != pipe(fds)) - return false; - - std::string filename = kBreakpadDumpFilenameTemplate; - if (NULL == mktemp(const_cast<char*>(filename.c_str()))) { - close(fds[0]); - close(fds[1]); - return false; - } - - // We must breakpad minidump the child process. - // Minidump ourself would crash in breakpad. - const pid_t child = fork(); - if (0 == child) { - close(fds[1]); - char b; - HANDLE_EINTR(read(fds[0], &b, sizeof(b))); - close(fds[0]); - syscall(__NR_exit); - } - if (-1 == child) { - close(fds[0]); - close(fds[1]); - return false; - } - - close(fds[0]); - - // Create minidump. - google_breakpad::ExceptionHandler::CrashContext context; - memset(&context, 0, sizeof(context)); - if (!WriteMinidump(filename.c_str(), child, - &context, sizeof(context))) { - close(fds[1]); - return false; - } - - // Upload minidump. - bool ret = SendDumpFile(filename.c_str()); - unlink(filename.c_str()); - close(fds[1]); - return ret; -} - bool Breakpad::OnBreakpadCallback(const char* dump_path, const char* minidump_id, bool succeeded) { diff --git a/o3d/breakpad/linux/breakpad.h b/o3d/breakpad/linux/breakpad.h index cbba468..ff133a2 100644 --- a/o3d/breakpad/linux/breakpad.h +++ b/o3d/breakpad/linux/breakpad.h @@ -65,9 +65,6 @@ class Breakpad { bool Initialize(); bool Shutdown(); - // Any data in extra_params is currently discarded. - bool GenerateAndSendDumpFile( - const std::map<std::string, std::string>* extra_params); private: static bool BuildDumpFilename(char* filename, |