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

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

Issue 1567983003: call static SequencedWorkerPool::GetSequenceToken() method directly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: drop WARN_UNUSED_RESULT change and call static method directly Created 4 years, 11 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 | « no previous file | content/browser/cache_storage/cache_storage_context_impl.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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // lifetime of the IO message loop. Thus, all calls to base::Bind() use 84 // lifetime of the IO message loop. Thus, all calls to base::Bind() use
85 // non-refcounted pointers. 85 // non-refcounted pointers.
86 86
87 CrashHandlerHostLinux::CrashHandlerHostLinux(const std::string& process_type, 87 CrashHandlerHostLinux::CrashHandlerHostLinux(const std::string& process_type,
88 const base::FilePath& dumps_path, 88 const base::FilePath& dumps_path,
89 bool upload) 89 bool upload)
90 : process_type_(process_type), 90 : process_type_(process_type),
91 dumps_path_(dumps_path), 91 dumps_path_(dumps_path),
92 upload_(upload), 92 upload_(upload),
93 shutting_down_(false), 93 shutting_down_(false),
94 worker_pool_token_(BrowserThread::GetBlockingPool()->GetSequenceToken()) { 94 worker_pool_token_(base::SequencedWorkerPool::GetSequenceToken()) {
95 int fds[2]; 95 int fds[2];
96 // We use SOCK_SEQPACKET rather than SOCK_DGRAM to prevent the process from 96 // We use SOCK_SEQPACKET rather than SOCK_DGRAM to prevent the process from
97 // sending datagrams to other sockets on the system. The sandbox may prevent 97 // sending datagrams to other sockets on the system. The sandbox may prevent
98 // the process from calling socket() to create new sockets, but it'll still 98 // the process from calling socket() to create new sockets, but it'll still
99 // inherit some sockets. With PF_UNIX+SOCK_DGRAM, it can call sendmsg to send 99 // inherit some sockets. With PF_UNIX+SOCK_DGRAM, it can call sendmsg to send
100 // a datagram to any (abstract) socket on the same system. With 100 // a datagram to any (abstract) socket on the same system. With
101 // SOCK_SEQPACKET, this is prevented. 101 // SOCK_SEQPACKET, this is prevented.
102 CHECK_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET, 0, fds)); 102 CHECK_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET, 0, fds));
103 static const int on = 1; 103 static const int on = 1;
104 104
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 // no-ops. 431 // no-ops.
432 shutting_down_ = true; 432 shutting_down_ = true;
433 uploader_thread_->Stop(); 433 uploader_thread_->Stop();
434 } 434 }
435 435
436 bool CrashHandlerHostLinux::IsShuttingDown() const { 436 bool CrashHandlerHostLinux::IsShuttingDown() const {
437 return shutting_down_; 437 return shutting_down_;
438 } 438 }
439 439
440 } // namespace breakpad 440 } // namespace breakpad
OLDNEW
« no previous file with comments | « no previous file | content/browser/cache_storage/cache_storage_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698