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

Side by Side Diff: chrome/app/breakpad_linux.cc

Issue 3333012: Linux: Handle renderer and plugin crashes on a separate thread. (try 2)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/crash_handler_host_linux.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #define SYS_SEGMENTNAME "syscalls" // For linux_syscall_support.h 5 #define SYS_SEGMENTNAME "syscalls" // For linux_syscall_support.h
6 6
7 #include "chrome/app/breakpad_linux.h" 7 #include "chrome/app/breakpad_linux.h"
8 8
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <stdlib.h> 10 #include <stdlib.h>
11 #include <sys/socket.h> 11 #include <sys/socket.h>
12 #include <sys/time.h> 12 #include <sys/time.h>
13 #include <sys/types.h> 13 #include <sys/types.h>
14 #include <sys/uio.h> 14 #include <sys/uio.h>
15 #include <time.h> 15 #include <time.h>
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 } 551 }
552 552
553 IGNORE_RET(sys_close(fds[0])); 553 IGNORE_RET(sys_close(fds[0]));
554 IGNORE_RET(sys_dup2(fds[1], 3)); 554 IGNORE_RET(sys_dup2(fds[1], 3));
555 static const char* const kWgetBinary = "/usr/bin/wget"; 555 static const char* const kWgetBinary = "/usr/bin/wget";
556 const char* args[] = { 556 const char* args[] = {
557 kWgetBinary, 557 kWgetBinary,
558 header, 558 header,
559 post_file, 559 post_file,
560 kUploadURL, 560 kUploadURL,
561 "--timeout=10", // Set a timeout so we don't hang forever.
562 "--tries=1", // Don't retry if the upload fails.
561 "-O", // output reply to fd 3 563 "-O", // output reply to fd 3
562 "/dev/fd/3", 564 "/dev/fd/3",
563 NULL, 565 NULL,
564 }; 566 };
565 567
566 execve(kWgetBinary, const_cast<char**>(args), environ); 568 execve(kWgetBinary, const_cast<char**>(args), environ);
567 static const char msg[] = "Cannot upload crash dump: cannot exec " 569 static const char msg[] = "Cannot upload crash dump: cannot exec "
568 "/usr/bin/wget\n"; 570 "/usr/bin/wget\n";
569 sys_write(2, msg, sizeof(msg) - 1); 571 sys_write(2, msg, sizeof(msg) - 1);
570 sys__exit(1); 572 sys__exit(1);
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 struct timeval tv; 766 struct timeval tv;
765 if (!gettimeofday(&tv, NULL)) 767 if (!gettimeofday(&tv, NULL))
766 uptime = timeval_to_ms(&tv); 768 uptime = timeval_to_ms(&tv);
767 else 769 else
768 uptime = 0; 770 uptime = 0;
769 } 771 }
770 772
771 bool IsCrashReporterEnabled() { 773 bool IsCrashReporterEnabled() {
772 return is_crash_reporter_enabled; 774 return is_crash_reporter_enabled;
773 } 775 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/crash_handler_host_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698