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

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

Issue 970513005: Roll WebRTC 8573:8602, Libjingle 8571:8600 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include code updates for interface changes Created 5 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 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "content/renderer/media/peer_connection_tracker.h" 4 #include "content/renderer/media/peer_connection_tracker.h"
5 5
6 #include "base/strings/string_number_conversions.h" 6 #include "base/strings/string_number_conversions.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/thread_task_runner_handle.h" 8 #include "base/thread_task_runner_handle.h"
9 #include "content/common/media/peer_connection_tracker_messages.h" 9 #include "content/common/media/peer_connection_tracker_messages.h"
10 #include "content/renderer/media/rtc_media_constraints.h" 10 #include "content/renderer/media/rtc_media_constraints.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 if (report.values().empty()) 209 if (report.values().empty())
210 return NULL; 210 return NULL;
211 211
212 base::DictionaryValue* dict = new base::DictionaryValue(); 212 base::DictionaryValue* dict = new base::DictionaryValue();
213 dict->SetDouble("timestamp", report.timestamp()); 213 dict->SetDouble("timestamp", report.timestamp());
214 214
215 base::ListValue* values = new base::ListValue(); 215 base::ListValue* values = new base::ListValue();
216 dict->Set("values", values); 216 dict->Set("values", values);
217 217
218 for (const auto& v : report.values()) { 218 for (const auto& v : report.values()) {
219 values->AppendString(v->display_name()); 219 values->AppendString(v.second->display_name());
220 values->AppendString(v->ToString()); 220 values->AppendString(v.second->ToString());
221 } 221 }
222 222
223 return dict; 223 return dict;
224 } 224 }
225 225
226 // Builds a DictionaryValue from the StatsReport. 226 // Builds a DictionaryValue from the StatsReport.
227 // The caller takes the ownership of the returned value. 227 // The caller takes the ownership of the returned value.
228 static base::DictionaryValue* GetDictValue(const webrtc::StatsReport& report) { 228 static base::DictionaryValue* GetDictValue(const webrtc::StatsReport& report) {
229 scoped_ptr<base::DictionaryValue> stats, result; 229 scoped_ptr<base::DictionaryValue> stats, result;
230 230
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 DCHECK(main_thread_.CalledOnValidThread()); 574 DCHECK(main_thread_.CalledOnValidThread());
575 if (peer_connection_id_map_.find(pc_handler) == peer_connection_id_map_.end()) 575 if (peer_connection_id_map_.find(pc_handler) == peer_connection_id_map_.end())
576 return; 576 return;
577 577
578 RenderThreadImpl::current()->Send( 578 RenderThreadImpl::current()->Send(
579 new PeerConnectionTrackerHost_UpdatePeerConnection( 579 new PeerConnectionTrackerHost_UpdatePeerConnection(
580 peer_connection_id_map_[pc_handler], type, value)); 580 peer_connection_id_map_[pc_handler], type, value));
581 } 581 }
582 582
583 } // namespace content 583 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/mock_peer_connection_impl.cc ('k') | content/renderer/media/rtc_peer_connection_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698