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 #include <string> | 5 #include <string> |
6 | 6 |
7 #include "base/files/file.h" | 7 #include "base/files/file.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
243 base::WriteFile(outgoing_dump, | 243 base::WriteFile(outgoing_dump, |
244 &outgoing_dump_content[0], | 244 &outgoing_dump_content[0], |
245 outgoing_dump_content.size()); | 245 outgoing_dump_content.size()); |
246 | 246 |
247 WebRtcLogUploadDoneData upload_done_data; | 247 WebRtcLogUploadDoneData upload_done_data; |
248 upload_done_data.log_path = temp_dir.path().AppendASCII("log"); | 248 upload_done_data.log_path = temp_dir.path().AppendASCII("log"); |
249 | 249 |
250 upload_done_data.incoming_rtp_dump = incoming_dump; | 250 upload_done_data.incoming_rtp_dump = incoming_dump; |
251 upload_done_data.outgoing_rtp_dump = outgoing_dump; | 251 upload_done_data.outgoing_rtp_dump = outgoing_dump; |
252 | 252 |
253 const size_t log_length = 100; | 253 scoped_ptr<WebRtcLogBuffer> log(new WebRtcLogBuffer()); |
254 scoped_ptr<unsigned char[]> log(new unsigned char[log_length]); | 254 log->SetComplete(); |
255 memset(log.get(), 0, log_length); | |
256 | |
257 webrtc_log_uploader->LoggingStoppedDoUpload( | 255 webrtc_log_uploader->LoggingStoppedDoUpload( |
258 log.Pass(), | 256 log.Pass(), |
259 log_length, | 257 scoped_ptr<MetaDataMap>(new MetaDataMap()).Pass(), |
perkj_chrome
2015/02/19 11:55:53
nit make_scoped_ptr
tommi (sloooow) - chröme
2015/02/19 13:31:41
Done.
| |
260 std::map<std::string, std::string>(), | |
261 upload_done_data); | 258 upload_done_data); |
262 | 259 |
263 VerifyRtpDumpInMultipart(post_data, "rtpdump_recv", incoming_dump_content); | 260 VerifyRtpDumpInMultipart(post_data, "rtpdump_recv", incoming_dump_content); |
264 VerifyRtpDumpInMultipart(post_data, "rtpdump_send", outgoing_dump_content); | 261 VerifyRtpDumpInMultipart(post_data, "rtpdump_send", outgoing_dump_content); |
265 | 262 |
266 webrtc_log_uploader->StartShutdown(); | 263 webrtc_log_uploader->StartShutdown(); |
267 } | 264 } |
OLD | NEW |