Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/rtc_peer_connection_handler.h" | 5 #include "content/renderer/media/rtc_peer_connection_handler.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1425 | 1425 |
| 1426 if (native_candidate) { | 1426 if (native_candidate) { |
| 1427 return_value = | 1427 return_value = |
| 1428 native_peer_connection_->AddIceCandidate(native_candidate.get()); | 1428 native_peer_connection_->AddIceCandidate(native_candidate.get()); |
| 1429 LOG_IF(ERROR, !return_value) << "Error processing ICE candidate."; | 1429 LOG_IF(ERROR, !return_value) << "Error processing ICE candidate."; |
| 1430 } else { | 1430 } else { |
| 1431 LOG(ERROR) << "Could not create native ICE candidate."; | 1431 LOG(ERROR) << "Could not create native ICE candidate."; |
| 1432 } | 1432 } |
| 1433 | 1433 |
| 1434 if (peer_connection_tracker_) { | 1434 if (peer_connection_tracker_) { |
| 1435 if (!return_value) { | |
| 1436 // Ensure that addIceCandidate shows up even if there is an error. | |
|
tommi (sloooow) - chröme
2017/01/09 14:41:17
reporting this twice intentionally?
fippo
2017/01/09 15:09:32
Yes. The first one (with the true argument) genera
hta - Chromium
2017/01/16 09:12:22
The original logic seemed to be that you logged ei
| |
| 1437 peer_connection_tracker_->TrackAddIceCandidate( | |
| 1438 this, candidate, PeerConnectionTracker::SOURCE_REMOTE, true); | |
| 1439 } | |
| 1435 peer_connection_tracker_->TrackAddIceCandidate( | 1440 peer_connection_tracker_->TrackAddIceCandidate( |
| 1436 this, candidate, PeerConnectionTracker::SOURCE_REMOTE, return_value); | 1441 this, candidate, PeerConnectionTracker::SOURCE_REMOTE, return_value); |
| 1437 } | 1442 } |
| 1438 return return_value; | 1443 return return_value; |
| 1439 } | 1444 } |
| 1440 | 1445 |
| 1441 void RTCPeerConnectionHandler::OnaddICECandidateResult( | 1446 void RTCPeerConnectionHandler::OnaddICECandidateResult( |
| 1442 const blink::WebRTCVoidRequest& webkit_request, bool result) { | 1447 const blink::WebRTCVoidRequest& webkit_request, bool result) { |
| 1443 DCHECK(thread_checker_.CalledOnValidThread()); | 1448 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1444 TRACE_EVENT0("webrtc", "RTCPeerConnectionHandler::OnaddICECandidateResult"); | 1449 TRACE_EVENT0("webrtc", "RTCPeerConnectionHandler::OnaddICECandidateResult"); |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1945 } | 1950 } |
| 1946 | 1951 |
| 1947 void RTCPeerConnectionHandler::ResetUMAStats() { | 1952 void RTCPeerConnectionHandler::ResetUMAStats() { |
| 1948 DCHECK(thread_checker_.CalledOnValidThread()); | 1953 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1949 num_local_candidates_ipv6_ = 0; | 1954 num_local_candidates_ipv6_ = 0; |
| 1950 num_local_candidates_ipv4_ = 0; | 1955 num_local_candidates_ipv4_ = 0; |
| 1951 ice_connection_checking_start_ = base::TimeTicks(); | 1956 ice_connection_checking_start_ = base::TimeTicks(); |
| 1952 memset(ice_state_seen_, 0, sizeof(ice_state_seen_)); | 1957 memset(ice_state_seen_, 0, sizeof(ice_state_seen_)); |
| 1953 } | 1958 } |
| 1954 } // namespace content | 1959 } // namespace content |
| OLD | NEW |