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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h

Issue 1750533002: Replace scoped_ptr with unique_ptr in webrtc/modules/remote_bitrate_estimator/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 #define BWE_TEST_LOGGING_BASELINEBAR(figure, name, value, flow_id) 113 #define BWE_TEST_LOGGING_BASELINEBAR(figure, name, value, flow_id)
114 114
115 // |num_flows| is an integer refering to the number of RMCAT flows in the 115 // |num_flows| is an integer refering to the number of RMCAT flows in the
116 // scenario. 116 // scenario.
117 // Define |x_label| and |y_label| for plots. 117 // Define |x_label| and |y_label| for plots.
118 #define BWE_TEST_LOGGING_LABEL(figure, x_label, y_label, num_flows) 118 #define BWE_TEST_LOGGING_LABEL(figure, x_label, y_label, num_flows)
119 119
120 #else // BWE_TEST_LOGGING_COMPILE_TIME_ENABLE 120 #else // BWE_TEST_LOGGING_COMPILE_TIME_ENABLE
121 121
122 #include <map> 122 #include <map>
123 #include <memory>
123 #include <stack> 124 #include <stack>
124 #include <string> 125 #include <string>
125 126
126 #include "webrtc/base/constructormagic.h" 127 #include "webrtc/base/constructormagic.h"
127 #include "webrtc/base/scoped_ptr.h"
128 #include "webrtc/common_types.h" 128 #include "webrtc/common_types.h"
129 129
130 #define BWE_TEST_LOGGING_GLOBAL_CONTEXT(name) \ 130 #define BWE_TEST_LOGGING_GLOBAL_CONTEXT(name) \
131 do { \ 131 do { \
132 webrtc::testing::bwe::Logging::GetInstance()->SetGlobalContext(name); \ 132 webrtc::testing::bwe::Logging::GetInstance()->SetGlobalContext(name); \
133 } while (0) 133 } while (0)
134 134
135 #define BWE_TEST_LOGGING_GLOBAL_ENABLE(enabled) \ 135 #define BWE_TEST_LOGGING_GLOBAL_ENABLE(enabled) \
136 do { \ 136 do { \
137 webrtc::testing::bwe::Logging::GetInstance()->SetGlobalEnable(enabled); \ 137 webrtc::testing::bwe::Logging::GetInstance()->SetGlobalEnable(enabled); \
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 std::stack<State> stack; 303 std::stack<State> stack;
304 }; 304 };
305 typedef std::map<uint32_t, ThreadState> ThreadMap; 305 typedef std::map<uint32_t, ThreadState> ThreadMap;
306 306
307 Logging(); 307 Logging();
308 void PushState(const std::string& append_to_tag, int64_t timestamp_ms, 308 void PushState(const std::string& append_to_tag, int64_t timestamp_ms,
309 bool enabled); 309 bool enabled);
310 void PopState(); 310 void PopState();
311 311
312 static Logging g_Logging; 312 static Logging g_Logging;
313 rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_; 313 std::unique_ptr<CriticalSectionWrapper> crit_sect_;
314 ThreadMap thread_map_; 314 ThreadMap thread_map_;
315 315
316 RTC_DISALLOW_COPY_AND_ASSIGN(Logging); 316 RTC_DISALLOW_COPY_AND_ASSIGN(Logging);
317 }; 317 };
318 } // namespace bwe 318 } // namespace bwe
319 } // namespace testing 319 } // namespace testing
320 } // namespace webrtc 320 } // namespace webrtc
321 321
322 #endif // BWE_TEST_LOGGING_COMPILE_TIME_ENABLE 322 #endif // BWE_TEST_LOGGING_COMPILE_TIME_ENABLE
323 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_LOGGING_H_ 323 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_LOGGING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698