| 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(), make_scoped_ptr(new MetaDataMap()), upload_done_data); |
| 259 log_length, | |
| 260 std::map<std::string, std::string>(), | |
| 261 upload_done_data); | |
| 262 | 257 |
| 263 VerifyRtpDumpInMultipart(post_data, "rtpdump_recv", incoming_dump_content); | 258 VerifyRtpDumpInMultipart(post_data, "rtpdump_recv", incoming_dump_content); |
| 264 VerifyRtpDumpInMultipart(post_data, "rtpdump_send", outgoing_dump_content); | 259 VerifyRtpDumpInMultipart(post_data, "rtpdump_send", outgoing_dump_content); |
| 265 | 260 |
| 266 webrtc_log_uploader->StartShutdown(); | 261 webrtc_log_uploader->StartShutdown(); |
| 267 } | 262 } |
| OLD | NEW |