OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_WEBRTC_LOG_MANAGER_H_ |
| 6 #define CONTENT_BROWSER_WEBRTC_LOG_MANAGER_H_ |
| 7 |
| 8 #include "base/memory/singleton.h" |
| 9 #include "base/platform_file.h" |
| 10 #include "content/common/content_export.h" |
| 11 |
| 12 namespace base { |
| 13 class SharedMemory; |
| 14 } |
| 15 |
| 16 namespace net { |
| 17 class FileStream; |
| 18 } |
| 19 |
| 20 namespace content { |
| 21 |
| 22 // This is a singleton class running in the browser FILE thread. |
| 23 // It reads a WebRTC log from a partial circular buffer and compresses it to a |
| 24 // file, then notifies the embedder that the file is ready. |
| 25 class CONTENT_EXPORT WebRtcLogManager { |
| 26 public: |
| 27 static WebRtcLogManager* GetInstance(); |
| 28 |
| 29 // Takes ownership of |shared_memory|. |
| 30 void UploadLog(base::SharedMemory* shared_memory, uint32 length, |
| 31 base::PlatformFile file); |
| 32 |
| 33 private: |
| 34 friend struct DefaultSingletonTraits<WebRtcLogManager>; |
| 35 |
| 36 WebRtcLogManager(); |
| 37 virtual ~WebRtcLogManager(); |
| 38 |
| 39 void ReadAndCompressLog(uint8* input, uint32 input_size, |
| 40 base::PlatformFile output_file); |
| 41 }; |
| 42 |
| 43 } // namespace content |
| 44 |
| 45 #endif // CONTENT_BROWSER_WEBRTC_LOG_MANAGER_H_ |
OLD | NEW |