| 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 "chrome/browser/media/webrtc_log_uploader.h" | 5 #include "chrome/browser/media/webrtc_log_uploader.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 &incoming_dump_content[0], | 266 &incoming_dump_content[0], |
| 267 incoming_dump_content.size()); | 267 incoming_dump_content.size()); |
| 268 base::WriteFile(outgoing_dump, | 268 base::WriteFile(outgoing_dump, |
| 269 &outgoing_dump_content[0], | 269 &outgoing_dump_content[0], |
| 270 outgoing_dump_content.size()); | 270 outgoing_dump_content.size()); |
| 271 | 271 |
| 272 WebRtcLogUploadDoneData upload_done_data; | 272 WebRtcLogUploadDoneData upload_done_data; |
| 273 upload_done_data.log_path = temp_dir.path().AppendASCII("log"); | 273 upload_done_data.log_path = temp_dir.path().AppendASCII("log"); |
| 274 | 274 |
| 275 scoped_ptr<Profile> profile(new TestingProfile()); | 275 scoped_ptr<Profile> profile(new TestingProfile()); |
| 276 scoped_refptr<WebRtcLoggingHandlerHost> host( | 276 scoped_refptr<WebRtcLoggingHandlerHost> host(new WebRtcLoggingHandlerHost( |
| 277 new WebRtcLoggingHandlerHost(profile.get(), webrtc_log_uploader.get())); | 277 -1, profile.get(), webrtc_log_uploader.get())); |
| 278 | 278 |
| 279 upload_done_data.incoming_rtp_dump = incoming_dump; | 279 upload_done_data.incoming_rtp_dump = incoming_dump; |
| 280 upload_done_data.outgoing_rtp_dump = outgoing_dump; | 280 upload_done_data.outgoing_rtp_dump = outgoing_dump; |
| 281 upload_done_data.host = host.get(); | 281 upload_done_data.host = host.get(); |
| 282 | 282 |
| 283 scoped_ptr<WebRtcLogBuffer> log(new WebRtcLogBuffer()); | 283 scoped_ptr<WebRtcLogBuffer> log(new WebRtcLogBuffer()); |
| 284 log->SetComplete(); | 284 log->SetComplete(); |
| 285 webrtc_log_uploader->LoggingStoppedDoUpload( | 285 webrtc_log_uploader->LoggingStoppedDoUpload( |
| 286 std::move(log), make_scoped_ptr(new MetaDataMap()), upload_done_data); | 286 std::move(log), make_scoped_ptr(new MetaDataMap()), upload_done_data); |
| 287 | 287 |
| 288 VerifyRtpDumpInMultipart(post_data, "rtpdump_recv", incoming_dump_content); | 288 VerifyRtpDumpInMultipart(post_data, "rtpdump_recv", incoming_dump_content); |
| 289 VerifyRtpDumpInMultipart(post_data, "rtpdump_send", outgoing_dump_content); | 289 VerifyRtpDumpInMultipart(post_data, "rtpdump_send", outgoing_dump_content); |
| 290 | 290 |
| 291 webrtc_log_uploader->StartShutdown(); | 291 webrtc_log_uploader->StartShutdown(); |
| 292 FlushIOThread(); | 292 FlushIOThread(); |
| 293 } | 293 } |
| OLD | NEW |