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

Side by Side Diff: webrtc/system_wrappers/source/logging_unittest.cc

Issue 1937693002: Replace scoped_ptr with unique_ptr everywhere (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@unique5
Patch Set: 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/system_wrappers/source/file_impl.h ('k') | webrtc/system_wrappers/source/trace_impl.h » ('j') | 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 #include "webrtc/system_wrappers/include/logging.h" 11 #include "webrtc/system_wrappers/include/logging.h"
12 12
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #include "webrtc/base/arraysize.h" 14 #include "webrtc/base/arraysize.h"
15 #include "webrtc/base/event.h" 15 #include "webrtc/base/event.h"
16 #include "webrtc/base/scoped_ptr.h"
17 #include "webrtc/system_wrappers/include/trace.h" 16 #include "webrtc/system_wrappers/include/trace.h"
18 17
19 namespace webrtc { 18 namespace webrtc {
20 namespace { 19 namespace {
21 const char kTestLogString[] = "Incredibly important test message!(?)"; 20 const char kTestLogString[] = "Incredibly important test message!(?)";
22 const int kTestLevel = kTraceWarning; 21 const int kTestLevel = kTraceWarning;
23 22
24 class LoggingTestCallback : public TraceCallback { 23 class LoggingTestCallback : public TraceCallback {
25 public: 24 public:
26 LoggingTestCallback(rtc::Event* event) : event_(event) {} 25 LoggingTestCallback(rtc::Event* event) : event_(event) {}
(...skipping 22 matching lines...) Expand all
49 LoggingTestCallback callback(&event); 48 LoggingTestCallback callback(&event);
50 Trace::SetTraceCallback(&callback); 49 Trace::SetTraceCallback(&callback);
51 50
52 LOG(LS_WARNING) << kTestLogString; 51 LOG(LS_WARNING) << kTestLogString;
53 EXPECT_TRUE(event.Wait(2000)); 52 EXPECT_TRUE(event.Wait(2000));
54 53
55 Trace::SetTraceCallback(nullptr); 54 Trace::SetTraceCallback(nullptr);
56 Trace::ReturnTrace(); 55 Trace::ReturnTrace();
57 } 56 }
58 } // namespace webrtc 57 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/system_wrappers/source/file_impl.h ('k') | webrtc/system_wrappers/source/trace_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698