OLD | NEW |
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_LOG_UPLOADER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_LOG_UPLOADER_H_ |
6 #define CHROME_BROWSER_MEDIA_WEBRTC_LOG_UPLOADER_H_ | 6 #define CHROME_BROWSER_MEDIA_WEBRTC_LOG_UPLOADER_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <map> | 10 #include <map> |
9 #include <string> | 11 #include <string> |
10 #include <vector> | 12 #include <vector> |
11 | 13 |
12 #include "base/basictypes.h" | |
13 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/macros.h" |
14 #include "base/threading/thread_checker.h" | 16 #include "base/threading/thread_checker.h" |
15 #include "chrome/browser/media/webrtc_logging_handler_host.h" | 17 #include "chrome/browser/media/webrtc_logging_handler_host.h" |
16 #include "net/url_request/url_fetcher_delegate.h" | 18 #include "net/url_request/url_fetcher_delegate.h" |
17 | 19 |
18 class Profile; | 20 class Profile; |
19 | 21 |
20 namespace base { | 22 namespace base { |
21 class SharedMemory; | 23 class SharedMemory; |
22 } | 24 } |
23 | 25 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 99 |
98 private: | 100 private: |
99 FRIEND_TEST_ALL_PREFIXES(WebRtcLogUploaderTest, | 101 FRIEND_TEST_ALL_PREFIXES(WebRtcLogUploaderTest, |
100 AddLocallyStoredLogInfoToUploadListFile); | 102 AddLocallyStoredLogInfoToUploadListFile); |
101 FRIEND_TEST_ALL_PREFIXES(WebRtcLogUploaderTest, | 103 FRIEND_TEST_ALL_PREFIXES(WebRtcLogUploaderTest, |
102 AddUploadedLogInfoToUploadListFile); | 104 AddUploadedLogInfoToUploadListFile); |
103 | 105 |
104 // net::URLFetcherDelegate implementation. | 106 // net::URLFetcherDelegate implementation. |
105 void OnURLFetchComplete(const net::URLFetcher* source) override; | 107 void OnURLFetchComplete(const net::URLFetcher* source) override; |
106 void OnURLFetchUploadProgress(const net::URLFetcher* source, | 108 void OnURLFetchUploadProgress(const net::URLFetcher* source, |
107 int64 current, | 109 int64_t current, |
108 int64 total) override; | 110 int64_t total) override; |
109 | 111 |
110 // Sets up a multipart body to be uploaded. The body is produced according | 112 // Sets up a multipart body to be uploaded. The body is produced according |
111 // to RFC 2046. | 113 // to RFC 2046. |
112 void SetupMultipart(std::string* post_data, | 114 void SetupMultipart(std::string* post_data, |
113 const std::string& compressed_log, | 115 const std::string& compressed_log, |
114 const base::FilePath& incoming_rtp_dump, | 116 const base::FilePath& incoming_rtp_dump, |
115 const base::FilePath& outgoing_rtp_dump, | 117 const base::FilePath& outgoing_rtp_dump, |
116 const std::map<std::string, std::string>& meta_data); | 118 const std::map<std::string, std::string>& meta_data); |
117 | 119 |
118 void CompressLog(std::string* compressed_log, | 120 void CompressLog(std::string* compressed_log, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 // Only accessed on the IO thread. | 194 // Only accessed on the IO thread. |
193 UploadDoneDataMap upload_done_data_; | 195 UploadDoneDataMap upload_done_data_; |
194 | 196 |
195 // When shutting down, don't create new URLFetchers. | 197 // When shutting down, don't create new URLFetchers. |
196 bool shutting_down_; | 198 bool shutting_down_; |
197 | 199 |
198 DISALLOW_COPY_AND_ASSIGN(WebRtcLogUploader); | 200 DISALLOW_COPY_AND_ASSIGN(WebRtcLogUploader); |
199 }; | 201 }; |
200 | 202 |
201 #endif // CHROME_BROWSER_MEDIA_WEBRTC_LOG_UPLOADER_H_ | 203 #endif // CHROME_BROWSER_MEDIA_WEBRTC_LOG_UPLOADER_H_ |
OLD | NEW |