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

Unified Diff: chrome/browser/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: Fixed build error on ChromeOS. 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
« no previous file with comments | « chrome/browser/media/webrtc_log_uploader.cc ('k') | chrome/browser/media/webrtc_logging_handler_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/webrtc_logging_handler_host.h
diff --git a/chrome/browser/media/webrtc_logging_handler_host.h b/chrome/browser/media/webrtc_logging_handler_host.h
index 2b735a8f323b4e1f0b4d70cf8a1a359281bf931f..5f67c1f0650c6a92d529fc11388ea91fd121952f 100644
--- a/chrome/browser/media/webrtc_logging_handler_host.h
+++ b/chrome/browser/media/webrtc_logging_handler_host.h
@@ -6,31 +6,48 @@
#define CHROME_BROWSER_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 net {
+class URLRequestContextGetter;
+} // namespace net
+
+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 content::BrowserMessageFilter {
public:
WebRtcLoggingHandlerHost();
private:
+ friend class content::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 content::BrowserThread;
- friend class base::DeleteHelper<WebRtcLoggingHandlerHost>;
+ void OnOpenLog(const std::string& app_session_id, const std::string& app_url);
- 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_;
+ scoped_refptr<net::URLRequestContextGetter> system_request_context_;
+ scoped_ptr<base::SharedMemory> shared_memory_;
std::string app_session_id_;
std::string app_url_;
« no previous file with comments | « chrome/browser/media/webrtc_log_uploader.cc ('k') | chrome/browser/media/webrtc_logging_handler_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698