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

Side by Side Diff: webrtc/system_wrappers/source/event_timer_posix.h

Issue 1920043002: Replace scoped_ptr with unique_ptr in webrtc/base/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 4 years, 7 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 | « webrtc/pc/mediasession_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_EVENT_POSIX_H_ 11 #ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_EVENT_POSIX_H_
12 #define WEBRTC_SYSTEM_WRAPPERS_SOURCE_EVENT_POSIX_H_ 12 #define WEBRTC_SYSTEM_WRAPPERS_SOURCE_EVENT_POSIX_H_
13 13
14 #include "webrtc/system_wrappers/include/event_wrapper.h" 14 #include "webrtc/system_wrappers/include/event_wrapper.h"
15 15
16 #include <memory>
17
16 #include <pthread.h> 18 #include <pthread.h>
17 #include <time.h> 19 #include <time.h>
18 20
19 #include "webrtc/base/platform_thread.h" 21 #include "webrtc/base/platform_thread.h"
20 22
21 namespace webrtc { 23 namespace webrtc {
22 24
23 enum State { 25 enum State {
24 kUp = 1, 26 kUp = 1,
25 kDown = 2 27 kDown = 2
(...skipping 16 matching lines...) Expand all
42 static bool Run(void* obj); 44 static bool Run(void* obj);
43 bool Process(); 45 bool Process();
44 EventTypeWrapper Wait(timespec* end_at, bool reset_state); 46 EventTypeWrapper Wait(timespec* end_at, bool reset_state);
45 47
46 virtual rtc::PlatformThread* CreateThread(); 48 virtual rtc::PlatformThread* CreateThread();
47 49
48 pthread_cond_t cond_; 50 pthread_cond_t cond_;
49 pthread_mutex_t mutex_; 51 pthread_mutex_t mutex_;
50 bool event_set_; 52 bool event_set_;
51 53
52 // TODO(pbos): Remove scoped_ptr and use PlatformThread directly. 54 // TODO(pbos): Remove unique_ptr and use PlatformThread directly.
53 rtc::scoped_ptr<rtc::PlatformThread> timer_thread_; 55 std::unique_ptr<rtc::PlatformThread> timer_thread_;
54 rtc::scoped_ptr<EventTimerPosix> timer_event_; 56 std::unique_ptr<EventTimerPosix> timer_event_;
55 timespec created_at_; 57 timespec created_at_;
56 58
57 bool periodic_; 59 bool periodic_;
58 unsigned long time_ms_; 60 unsigned long time_ms_;
59 unsigned long count_; 61 unsigned long count_;
60 bool is_stopping_; 62 bool is_stopping_;
61 }; 63 };
62 64
63 } // namespace webrtc 65 } // namespace webrtc
64 66
65 #endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_EVENT_POSIX_H_ 67 #endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_EVENT_POSIX_H_
OLDNEW
« no previous file with comments | « webrtc/pc/mediasession_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698