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

Side by Side Diff: components/crash/content/browser/crash_handler_host_linux.cc

Issue 2695593009: Use the location where FileDescriptorWatcher is created to track the libevent handlers (Closed)
Patch Set: fix mac. Created 3 years, 10 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
« no previous file with comments | « chromeos/binder/ipc_thread.cc ('k') | dbus/bus.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "components/crash/content/browser/crash_handler_host_linux.h" 5 #include "components/crash/content/browser/crash_handler_host_linux.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <stdlib.h> 10 #include <stdlib.h>
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // non-refcounted pointers. 92 // non-refcounted pointers.
93 93
94 CrashHandlerHostLinux::CrashHandlerHostLinux(const std::string& process_type, 94 CrashHandlerHostLinux::CrashHandlerHostLinux(const std::string& process_type,
95 const base::FilePath& dumps_path, 95 const base::FilePath& dumps_path,
96 bool upload) 96 bool upload)
97 : process_type_(process_type), 97 : process_type_(process_type),
98 dumps_path_(dumps_path), 98 dumps_path_(dumps_path),
99 #if !defined(OS_ANDROID) 99 #if !defined(OS_ANDROID)
100 upload_(upload), 100 upload_(upload),
101 #endif 101 #endif
102 file_descriptor_watcher_(FROM_HERE),
102 shutting_down_(false), 103 shutting_down_(false),
103 worker_pool_token_(base::SequencedWorkerPool::GetSequenceToken()) { 104 worker_pool_token_(base::SequencedWorkerPool::GetSequenceToken()) {
104 write_dump_file_sequence_checker_.DetachFromSequence(); 105 write_dump_file_sequence_checker_.DetachFromSequence();
105 106
106 int fds[2]; 107 int fds[2];
107 // We use SOCK_SEQPACKET rather than SOCK_DGRAM to prevent the process from 108 // We use SOCK_SEQPACKET rather than SOCK_DGRAM to prevent the process from
108 // sending datagrams to other sockets on the system. The sandbox may prevent 109 // sending datagrams to other sockets on the system. The sandbox may prevent
109 // the process from calling socket() to create new sockets, but it'll still 110 // the process from calling socket() to create new sockets, but it'll still
110 // inherit some sockets. With PF_UNIX+SOCK_DGRAM, it can call sendmsg to send 111 // inherit some sockets. With PF_UNIX+SOCK_DGRAM, it can call sendmsg to send
111 // a datagram to any (abstract) socket on the same system. With 112 // a datagram to any (abstract) socket on the same system. With
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 // no-ops. 493 // no-ops.
493 shutting_down_ = true; 494 shutting_down_ = true;
494 uploader_thread_->Stop(); 495 uploader_thread_->Stop();
495 } 496 }
496 497
497 bool CrashHandlerHostLinux::IsShuttingDown() const { 498 bool CrashHandlerHostLinux::IsShuttingDown() const {
498 return shutting_down_; 499 return shutting_down_;
499 } 500 }
500 501
501 } // namespace breakpad 502 } // namespace breakpad
OLDNEW
« no previous file with comments | « chromeos/binder/ipc_thread.cc ('k') | dbus/bus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698