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

Side by Side Diff: chrome/browser/media/webrtc_logging_handler_host.h

Issue 140843007: Implement browser-side logging to WebRtc log (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_LOGGING_HANDLER_HOST_H_ 5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_LOGGING_HANDLER_HOST_H_
6 #define CHROME_BROWSER_MEDIA_WEBRTC_LOGGING_HANDLER_HOST_H_ 6 #define CHROME_BROWSER_MEDIA_WEBRTC_LOGGING_HANDLER_HOST_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "content/public/browser/browser_message_filter.h" 10 #include "content/public/browser/browser_message_filter.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void UploadLog(const UploadDoneCallback& callback); 54 void UploadLog(const UploadDoneCallback& callback);
55 55
56 // Called by WebRtcLogUploader when uploading has finished. Must be called on 56 // Called by WebRtcLogUploader when uploading has finished. Must be called on
57 // the IO thread. 57 // the IO thread.
58 void UploadLogDone(); 58 void UploadLogDone();
59 59
60 // Discards the log. May only be called after logging has stopped. Must be 60 // Discards the log. May only be called after logging has stopped. Must be
61 // called on the IO thread. 61 // called on the IO thread.
62 void DiscardLog(const GenericDoneCallback& callback); 62 void DiscardLog(const GenericDoneCallback& callback);
63 63
64 // Adds a message to the log. Must be called on the IO thread.
65 void LogMessage(const std::string& message);
66
64 // May be called on any thread. |upload_log_on_render_close_| is used 67 // May be called on any thread. |upload_log_on_render_close_| is used
65 // for decision making and it's OK if it changes before the execution based 68 // for decision making and it's OK if it changes before the execution based
66 // on that decision has finished. 69 // on that decision has finished.
67 void set_upload_log_on_render_close(bool should_upload) { 70 void set_upload_log_on_render_close(bool should_upload) {
68 upload_log_on_render_close_ = should_upload; 71 upload_log_on_render_close_ = should_upload;
69 } 72 }
70 73
71 private: 74 private:
72 // States used for protecting from function calls made at non-allowed points 75 // States used for protecting from function calls made at non-allowed points
73 // in time. For example, StartLogging() is only allowed in CLOSED state. 76 // in time. For example, StartLogging() is only allowed in CLOSED state.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 148
146 // This is the handle to be passed to the render process. It's stored so that 149 // This is the handle to be passed to the render process. It's stored so that
147 // it doesn't have to be passed on when posting messages between threads. 150 // it doesn't have to be passed on when posting messages between threads.
148 // It's only accessed on the IO thread. 151 // It's only accessed on the IO thread.
149 base::SharedMemoryHandle foreign_memory_handle_; 152 base::SharedMemoryHandle foreign_memory_handle_;
150 153
151 DISALLOW_COPY_AND_ASSIGN(WebRtcLoggingHandlerHost); 154 DISALLOW_COPY_AND_ASSIGN(WebRtcLoggingHandlerHost);
152 }; 155 };
153 156
154 #endif // CHROME_BROWSER_MEDIA_WEBRTC_LOGGING_HANDLER_HOST_H_ 157 #endif // CHROME_BROWSER_MEDIA_WEBRTC_LOGGING_HANDLER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698