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

Side by Side Diff: third_party/WebKit/Source/platform/WaitableEvent.cpp

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "platform/WaitableEvent.h" 5 #include "platform/WaitableEvent.h"
6 6
7 #include <vector>
7 #include "base/synchronization/waitable_event.h" 8 #include "base/synchronization/waitable_event.h"
8 #include "platform/heap/SafePoint.h" 9 #include "platform/heap/SafePoint.h"
9 #include "platform/heap/ThreadState.h" 10 #include "platform/heap/ThreadState.h"
10 #include "wtf/Optional.h" 11 #include "wtf/Optional.h"
11 #include "wtf/PtrUtil.h" 12 #include "wtf/PtrUtil.h"
12 #include <vector>
13 13
14 namespace blink { 14 namespace blink {
15 15
16 WaitableEvent::WaitableEvent(ResetPolicy policy, InitialState state) { 16 WaitableEvent::WaitableEvent(ResetPolicy policy, InitialState state) {
17 m_impl = WTF::wrapUnique(new base::WaitableEvent( 17 m_impl = WTF::wrapUnique(new base::WaitableEvent(
18 policy == ResetPolicy::Manual 18 policy == ResetPolicy::Manual
19 ? base::WaitableEvent::ResetPolicy::MANUAL 19 ? base::WaitableEvent::ResetPolicy::MANUAL
20 : base::WaitableEvent::ResetPolicy::AUTOMATIC, 20 : base::WaitableEvent::ResetPolicy::AUTOMATIC,
21 state == InitialState::Signaled 21 state == InitialState::Signaled
22 ? base::WaitableEvent::InitialState::SIGNALED 22 ? base::WaitableEvent::InitialState::SIGNALED
(...skipping 18 matching lines...) Expand all
41 std::vector<base::WaitableEvent*> baseEvents; 41 std::vector<base::WaitableEvent*> baseEvents;
42 for (size_t i = 0; i < events.size(); ++i) 42 for (size_t i = 0; i < events.size(); ++i)
43 baseEvents.push_back(events[i]->m_impl.get()); 43 baseEvents.push_back(events[i]->m_impl.get());
44 size_t idx = 44 size_t idx =
45 base::WaitableEvent::WaitMany(baseEvents.data(), baseEvents.size()); 45 base::WaitableEvent::WaitMany(baseEvents.data(), baseEvents.size());
46 DCHECK_LT(idx, events.size()); 46 DCHECK_LT(idx, events.size());
47 return idx; 47 return idx;
48 } 48 }
49 49
50 } // namespace blink 50 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/WaitableEvent.h ('k') | third_party/WebKit/Source/platform/WebIconSizesParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698