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

Side by Side Diff: content/browser/webrtc_log_manager.h

Issue 14329020: Implementing uploading of a WebRTC diagnostic log. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed pre-submit warnings/errors (including adding bzip2 to content/browser DEPS). 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698