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

Unified Diff: trunk/src/content/renderer/media/rtc_peer_connection_handler.cc

Issue 296213007: Revert 272504 "Destroy all rtc peer connection handlers before s..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/content/renderer/media/rtc_peer_connection_handler.cc
===================================================================
--- trunk/src/content/renderer/media/rtc_peer_connection_handler.cc (revision 272539)
+++ trunk/src/content/renderer/media/rtc_peer_connection_handler.cc (working copy)
@@ -10,7 +10,6 @@
#include "base/command_line.h"
#include "base/debug/trace_event.h"
-#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/metrics/histogram.h"
@@ -318,8 +317,6 @@
impl_.addStatistic(report, name, value);
}
-namespace {
-
class PeerConnectionUMAObserver : public webrtc::UMAObserver {
public:
PeerConnectionUMAObserver() {}
@@ -354,11 +351,6 @@
}
};
-base::LazyInstance<std::set<RTCPeerConnectionHandler*> >::Leaky
- g_peer_connection_handlers = LAZY_INSTANCE_INITIALIZER;
-
-} // namespace
-
RTCPeerConnectionHandler::RTCPeerConnectionHandler(
blink::WebRTCPeerConnectionHandlerClient* client,
PeerConnectionDependencyFactory* dependency_factory)
@@ -367,11 +359,9 @@
frame_(NULL),
peer_connection_tracker_(NULL),
num_data_channels_created_(0) {
- g_peer_connection_handlers.Get().insert(this);
}
RTCPeerConnectionHandler::~RTCPeerConnectionHandler() {
- g_peer_connection_handlers.Get().erase(this);
if (peer_connection_tracker_)
peer_connection_tracker_->UnregisterPeerConnection(this);
STLDeleteValues(&remote_streams_);
@@ -380,18 +370,6 @@
"WebRTC.NumDataChannelsPerPeerConnection", num_data_channels_created_);
}
-// static
-void RTCPeerConnectionHandler::DestructAllHandlers() {
- std::set<RTCPeerConnectionHandler*> handlers(
- g_peer_connection_handlers.Get().begin(),
- g_peer_connection_handlers.Get().end());
- for (std::set<RTCPeerConnectionHandler*>::iterator handler = handlers.begin();
- handler != handlers.end();
- ++handler) {
- (*handler)->client_->releasePeerConnectionHandler();
- }
-}
-
void RTCPeerConnectionHandler::associateWithFrame(blink::WebFrame* frame) {
DCHECK(frame);
frame_ = frame;
« no previous file with comments | « trunk/src/content/renderer/media/rtc_peer_connection_handler.h ('k') | trunk/src/content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698