OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "media/cast/logging/simple_event_subscriber.h" | 5 #include "media/cast/logging/simple_event_subscriber.h" |
6 | 6 |
7 #include <vector> | |
8 | 7 |
9 #include "base/logging.h" | 8 #include "base/logging.h" |
10 | 9 |
11 namespace media { | 10 namespace media { |
12 namespace cast { | 11 namespace cast { |
13 | 12 |
14 SimpleEventSubscriber::SimpleEventSubscriber() {} | 13 SimpleEventSubscriber::SimpleEventSubscriber() {} |
15 | 14 |
16 SimpleEventSubscriber::~SimpleEventSubscriber() { | 15 SimpleEventSubscriber::~SimpleEventSubscriber() { |
17 DCHECK(thread_checker_.CalledOnValidThread()); | 16 DCHECK(thread_checker_.CalledOnValidThread()); |
(...skipping 19 matching lines...) Expand all Loading... |
37 | 36 |
38 void SimpleEventSubscriber::GetPacketEventsAndReset( | 37 void SimpleEventSubscriber::GetPacketEventsAndReset( |
39 std::vector<PacketEvent>* packet_events) { | 38 std::vector<PacketEvent>* packet_events) { |
40 DCHECK(thread_checker_.CalledOnValidThread()); | 39 DCHECK(thread_checker_.CalledOnValidThread()); |
41 packet_events->swap(packet_events_); | 40 packet_events->swap(packet_events_); |
42 packet_events_.clear(); | 41 packet_events_.clear(); |
43 } | 42 } |
44 | 43 |
45 } // namespace cast | 44 } // namespace cast |
46 } // namespace media | 45 } // namespace media |
OLD | NEW |