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

Unified Diff: content/browser/renderer_host/media/webrtc_logging_handler_host.cc

Issue 15741003: Moving WebRTC logging related files from content to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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: content/browser/renderer_host/media/webrtc_logging_handler_host.cc
diff --git a/content/browser/renderer_host/media/webrtc_logging_handler_host.cc b/content/browser/renderer_host/media/webrtc_logging_handler_host.cc
deleted file mode 100644
index 10e2101c80590cd4d69afe0697c576a3c96b13c7..0000000000000000000000000000000000000000
--- a/content/browser/renderer_host/media/webrtc_logging_handler_host.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/browser/renderer_host/media/webrtc_logging_handler_host.h"
-
-#include "base/bind.h"
-#include "base/logging.h"
-#include "content/common/media/webrtc_logging_messages.h"
-
-namespace content {
-
-#if defined(OS_ANDROID)
-const size_t kWebRtcLogSize = 1 * 1024 * 1024; // 1 MB
-#else
-const size_t kWebRtcLogSize = 6 * 1024 * 1024; // 6 MB
-#endif
-
-WebRtcLoggingHandlerHost::WebRtcLoggingHandlerHost() {
-}
-
-WebRtcLoggingHandlerHost::~WebRtcLoggingHandlerHost() {
-}
-
-void WebRtcLoggingHandlerHost::OnChannelClosing() {
- BrowserMessageFilter::OnChannelClosing();
-}
-
-void WebRtcLoggingHandlerHost::OnDestruct() const {
- BrowserThread::DeleteOnIOThread::Destruct(this);
-}
-
-bool WebRtcLoggingHandlerHost::OnMessageReceived(const IPC::Message& message,
- bool* message_was_ok) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP_EX(WebRtcLoggingHandlerHost, message, *message_was_ok)
- IPC_MESSAGE_HANDLER(WebRtcLoggingMsg_OpenLog, OnOpenLog)
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP_EX()
-
- return handled;
-}
-
-void WebRtcLoggingHandlerHost::OnOpenLog(const std::string& app_session_id,
- const std::string& app_url) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- DCHECK(!base::SharedMemory::IsHandleValid(shared_memory_.handle()));
-
- if (!shared_memory_.CreateAndMapAnonymous(kWebRtcLogSize)) {
- DLOG(ERROR) << "Failed to create shared memory.";
- Send(new WebRtcLoggingMsg_OpenLogFailed());
- return;
- }
-
- base::SharedMemoryHandle foreign_memory_handle;
- if (!shared_memory_.ShareToProcess(peer_handle(),
- &foreign_memory_handle)) {
- Send(new WebRtcLoggingMsg_OpenLogFailed());
- return;
- }
-
- app_session_id_ = app_session_id;
- app_url_ = app_url;
- Send(new WebRtcLoggingMsg_LogOpened(foreign_memory_handle, kWebRtcLogSize));
-}
-
-} // namespace content

Powered by Google App Engine
This is Rietveld 408576698