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

Side by Side Diff: tools/ipc_fuzzer/message_replay/replay_process.cc

Issue 2054613002: Manual refactor of few more stragglers to enum-based WaitableEvent constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@d_3_webkit
Patch Set: caught one more with event_\( instead of _event_\( Created 4 years, 6 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
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 "tools/ipc_fuzzer/message_replay/replay_process.h" 5 #include "tools/ipc_fuzzer/message_replay/replay_process.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #elif defined(OS_POSIX) 42 #elif defined(OS_POSIX)
43 platform_channel.reset(mojo::edk::PlatformHandle( 43 platform_channel.reset(mojo::edk::PlatformHandle(
44 base::GlobalDescriptors::GetInstance()->Get(kMojoIPCChannel))); 44 base::GlobalDescriptors::GetInstance()->Get(kMojoIPCChannel)));
45 #endif 45 #endif
46 CHECK(platform_channel.is_valid()); 46 CHECK(platform_channel.is_valid());
47 mojo::edk::SetParentPipeHandle(std::move(platform_channel)); 47 mojo::edk::SetParentPipeHandle(std::move(platform_channel));
48 } 48 }
49 49
50 ReplayProcess::ReplayProcess() 50 ReplayProcess::ReplayProcess()
51 : io_thread_("Chrome_ChildIOThread"), 51 : io_thread_("Chrome_ChildIOThread"),
52 shutdown_event_(true, false), 52 shutdown_event_(base::WaitableEvent::ResetPolicy::MANUAL,
53 message_index_(0) { 53 base::WaitableEvent::InitialState::NOT_SIGNALED),
54 } 54 message_index_(0) {}
55 55
56 ReplayProcess::~ReplayProcess() { 56 ReplayProcess::~ReplayProcess() {
57 channel_.reset(); 57 channel_.reset();
58 58
59 // Signal this event before shutting down the service process. That way all 59 // Signal this event before shutting down the service process. That way all
60 // background threads can cleanup. 60 // background threads can cleanup.
61 shutdown_event_.Signal(); 61 shutdown_event_.Signal();
62 io_thread_.Stop(); 62 io_thread_.Stop();
63 } 63 }
64 64
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 return true; 162 return true;
163 } 163 }
164 164
165 void ReplayProcess::OnChannelError() { 165 void ReplayProcess::OnChannelError() {
166 LOG(ERROR) << "Channel error, quitting after " 166 LOG(ERROR) << "Channel error, quitting after "
167 << message_index_ << " messages"; 167 << message_index_ << " messages";
168 base::MessageLoop::current()->QuitWhenIdle(); 168 base::MessageLoop::current()->QuitWhenIdle();
169 } 169 }
170 170
171 } // namespace ipc_fuzzer 171 } // namespace ipc_fuzzer
OLDNEW
« no previous file with comments | « components/nacl/loader/nonsfi/nonsfi_listener.cc ('k') | ui/ozone/platform/wayland/fake_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698