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

Side by Side Diff: chrome/browser/media/webrtc_log_uploader_unittest.cc

Issue 1871533002: Change WebRTC log callback registration in browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review (olka) Created 4 years, 8 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
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/media/webrtc_logging_handler_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698