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

Side by Side Diff: content/renderer/media/mock_peer_connection_impl.cc

Issue 468783003: Update implementations of webrtc::SetSessionDescriptionObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | content/renderer/media/rtc_peer_connection_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/media/mock_peer_connection_impl.h" 5 #include "content/renderer/media/mock_peer_connection_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/renderer/media/webrtc/mock_peer_connection_dependency_factory. h" 10 #include "content/renderer/media/webrtc/mock_peer_connection_dependency_factory. h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 DCHECK_EQ(kStatsOutputLevelStandard, level); 271 DCHECK_EQ(kStatsOutputLevelStandard, level);
272 webrtc::StatsReport report1, report2; 272 webrtc::StatsReport report1, report2;
273 report1.id = "1234"; 273 report1.id = "1234";
274 report1.type = "ssrc"; 274 report1.type = "ssrc";
275 report1.timestamp = 42; 275 report1.timestamp = 42;
276 report1.values.push_back( 276 report1.values.push_back(
277 webrtc::StatsReport::Value( 277 webrtc::StatsReport::Value(
278 webrtc::StatsReport::kStatsValueNameFingerprint, 278 webrtc::StatsReport::kStatsValueNameFingerprint,
279 "trackvalue")); 279 "trackvalue"));
280 280
281 std::vector<webrtc::StatsReport> reports; 281 webrtc::StatsReports reports;
282 reports.push_back(report1); 282 reports.push_back(&report1);
283 283
284 // If selector is given, we pass back one report. 284 // If selector is given, we pass back one report.
285 // If selector is not given, we pass back two. 285 // If selector is not given, we pass back two.
286 if (!track) { 286 if (!track) {
287 report2.id = "nontrack"; 287 report2.id = "nontrack";
288 report2.type = "generic"; 288 report2.type = "generic";
289 report2.timestamp = 44; 289 report2.timestamp = 44;
290 report2.values.push_back( 290 report2.values.push_back(
291 webrtc::StatsReport::Value( 291 webrtc::StatsReport::Value(
292 webrtc::StatsReport::kStatsValueNameFingerprintAlgorithm, 292 webrtc::StatsReport::kStatsValueNameFingerprintAlgorithm,
293 "somevalue")); 293 "somevalue"));
294 reports.push_back(report2); 294 reports.push_back(&report2);
295 } 295 }
296 296
297 // Note that the callback is synchronous, not asynchronous; it will 297 // Note that the callback is synchronous, not asynchronous; it will
298 // happen before the request call completes. 298 // happen before the request call completes.
299 observer->OnComplete(reports); 299 observer->OnComplete(reports);
300 300
301 return true; 301 return true;
302 } 302 }
303 303
304 const webrtc::SessionDescriptionInterface* 304 const webrtc::SessionDescriptionInterface*
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 sdp_mline_index_ = candidate->sdp_mline_index(); 359 sdp_mline_index_ = candidate->sdp_mline_index();
360 return candidate->ToString(&ice_sdp_); 360 return candidate->ToString(&ice_sdp_);
361 } 361 }
362 362
363 void MockPeerConnectionImpl::RegisterUMAObserver( 363 void MockPeerConnectionImpl::RegisterUMAObserver(
364 webrtc::UMAObserver* observer) { 364 webrtc::UMAObserver* observer) {
365 NOTIMPLEMENTED(); 365 NOTIMPLEMENTED();
366 } 366 }
367 367
368 } // namespace content 368 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/rtc_peer_connection_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698