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

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

Issue 14329020: Implementing uploading of a WebRTC diagnostic log. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review, added url and app session id, 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.h
diff --git a/content/browser/renderer_host/media/webrtc_logging_handler_host.h b/content/browser/renderer_host/media/webrtc_logging_handler_host.h
index 7ab7fbaa93721022aafd8e47e48f6d497da2193d..5314a09486984bbffb6699ee1b0c20c577e73bc0 100644
--- a/content/browser/renderer_host/media/webrtc_logging_handler_host.h
+++ b/content/browser/renderer_host/media/webrtc_logging_handler_host.h
@@ -6,33 +6,46 @@
#define CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEBRTC_LOGGING_HANDLER_HOST_H_
#include "base/basictypes.h"
-#include "base/shared_memory.h"
#include "content/public/browser/browser_message_filter.h"
+namespace base {
+class SharedMemory;
+} // namespace base
+
namespace content {
+class RenderProcessHost;
+
// WebRtcLoggingHandlerHost handles operations regarding the WebRTC logging:
-// opening and closing shared memory buffer that the handler in the renderer
-// process writes to.
+// - Opens a shared memory buffer that the handler in the render process
+// writes to.
+// - Detects when channel, i.e. renderer, is going away and triggers uploading
+// the log.
class WebRtcLoggingHandlerHost : public BrowserMessageFilter {
public:
- WebRtcLoggingHandlerHost();
+ WebRtcLoggingHandlerHost(RenderProcessHost* render_process_host);
private:
+ friend class BrowserThread;
+ friend class base::DeleteHelper<WebRtcLoggingHandlerHost>;
+
+ virtual ~WebRtcLoggingHandlerHost();
+
// BrowserMessageFilter implementation.
virtual void OnChannelClosing() OVERRIDE;
virtual void OnDestruct() const OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message,
bool* message_was_ok) OVERRIDE;
- friend class BrowserThread;
- friend class base::DeleteHelper<WebRtcLoggingHandlerHost>;
+ void OnOpenLog(const std::string& app_session_id, const std::string& app_url);
Jói 2013/05/24 21:14:06 +80
Henrik Grunell 2013/05/27 13:00:32 Done.
- virtual ~WebRtcLoggingHandlerHost();
+ void OpenLogIfAllowed();
+ void DoOpenLog();
- void OnOpenLog(const std::string& app_session_id, const std::string& app_url);
+ void UploadLog();
- base::SharedMemory shared_memory_;
+ RenderProcessHost* render_process_host_;
+ scoped_ptr<base::SharedMemory> shared_memory_;
std::string app_session_id_;
std::string app_url_;

Powered by Google App Engine
This is Rietveld 408576698