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

Side by Side Diff: webrtc/api/statscollector_unittest.cc

Issue 1921653002: Enable -Winconsistent-missing-override flag. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. 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
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2014 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // Error return values 61 // Error return values
62 const char kNotFound[] = "NOT FOUND"; 62 const char kNotFound[] = "NOT FOUND";
63 63
64 // Constant names for track identification. 64 // Constant names for track identification.
65 const char kLocalTrackId[] = "local_track_id"; 65 const char kLocalTrackId[] = "local_track_id";
66 const char kRemoteTrackId[] = "remote_track_id"; 66 const char kRemoteTrackId[] = "remote_track_id";
67 const uint32_t kSsrcOfTrack = 1234; 67 const uint32_t kSsrcOfTrack = 1234;
68 68
69 class MockWebRtcSession : public webrtc::WebRtcSession { 69 class MockWebRtcSession : public webrtc::WebRtcSession {
70 public: 70 public:
71 // TODO(nisse): Valid overrides commented out, because the gmock
72 // methods don't use any override declarations, and we want to avoid
73 // warnings from -Winconsistent-missing-override. See
74 // http://crbug.com/428099.
71 explicit MockWebRtcSession(webrtc::MediaControllerInterface* media_controller) 75 explicit MockWebRtcSession(webrtc::MediaControllerInterface* media_controller)
72 : WebRtcSession(media_controller, 76 : WebRtcSession(media_controller,
73 rtc::Thread::Current(), 77 rtc::Thread::Current(),
74 rtc::Thread::Current(), 78 rtc::Thread::Current(),
75 nullptr) {} 79 nullptr) {}
76 MOCK_METHOD0(voice_channel, cricket::VoiceChannel*()); 80 MOCK_METHOD0(voice_channel, cricket::VoiceChannel*());
77 MOCK_METHOD0(video_channel, cricket::VideoChannel*()); 81 MOCK_METHOD0(video_channel, cricket::VideoChannel*());
78 // Libjingle uses "local" for a outgoing track, and "remote" for a incoming 82 // Libjingle uses "local" for a outgoing track, and "remote" for a incoming
79 // track. 83 // track.
80 MOCK_METHOD2(GetLocalTrackIdBySsrc, bool(uint32_t, std::string*)); 84 MOCK_METHOD2(GetLocalTrackIdBySsrc, bool(uint32_t, std::string*));
81 MOCK_METHOD2(GetRemoteTrackIdBySsrc, bool(uint32_t, std::string*)); 85 MOCK_METHOD2(GetRemoteTrackIdBySsrc, bool(uint32_t, std::string*));
82 MOCK_METHOD1(GetTransportStats, bool(SessionStats*)); 86 MOCK_METHOD1(GetTransportStats, bool(SessionStats*));
83 MOCK_METHOD2(GetLocalCertificate, 87 MOCK_METHOD2(GetLocalCertificate,
84 bool(const std::string& transport_name, 88 bool(const std::string& transport_name,
85 rtc::scoped_refptr<rtc::RTCCertificate>* certificate)); 89 rtc::scoped_refptr<rtc::RTCCertificate>* certificate));
86 90
87 // Workaround for gmock's inability to cope with move-only return values. 91 // Workaround for gmock's inability to cope with move-only return values.
88 std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate( 92 std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate(
89 const std::string& transport_name) override { 93 const std::string& transport_name) /* override */ {
90 return std::unique_ptr<rtc::SSLCertificate>( 94 return std::unique_ptr<rtc::SSLCertificate>(
91 GetRemoteSSLCertificate_ReturnsRawPointer(transport_name)); 95 GetRemoteSSLCertificate_ReturnsRawPointer(transport_name));
92 } 96 }
93 MOCK_METHOD1(GetRemoteSSLCertificate_ReturnsRawPointer, 97 MOCK_METHOD1(GetRemoteSSLCertificate_ReturnsRawPointer,
94 rtc::SSLCertificate*(const std::string& transport_name)); 98 rtc::SSLCertificate*(const std::string& transport_name));
95 }; 99 };
96 100
97 // The factory isn't really used; it just satisfies the base PeerConnection. 101 // The factory isn't really used; it just satisfies the base PeerConnection.
98 class FakePeerConnectionFactory 102 class FakePeerConnectionFactory
99 : public rtc::RefCountedObject<PeerConnectionFactory> {}; 103 : public rtc::RefCountedObject<PeerConnectionFactory> {};
(...skipping 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 cricket::VoiceSenderInfo new_voice_sender_info; 1751 cricket::VoiceSenderInfo new_voice_sender_info;
1748 InitVoiceSenderInfo(&new_voice_sender_info); 1752 InitVoiceSenderInfo(&new_voice_sender_info);
1749 cricket::VoiceMediaInfo new_stats_read; 1753 cricket::VoiceMediaInfo new_stats_read;
1750 reports.clear(); 1754 reports.clear();
1751 SetupAndVerifyAudioTrackStats( 1755 SetupAndVerifyAudioTrackStats(
1752 new_audio_track.get(), stream_.get(), &stats, &voice_channel, kVcName, 1756 new_audio_track.get(), stream_.get(), &stats, &voice_channel, kVcName,
1753 media_channel, &new_voice_sender_info, NULL, &new_stats_read, &reports); 1757 media_channel, &new_voice_sender_info, NULL, &new_stats_read, &reports);
1754 } 1758 }
1755 1759
1756 } // namespace webrtc 1760 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698