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

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

Issue 1469783002: Cleanup: Correctly spell success(ful). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format media Created 5 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/files/file_util.h" 6 #include "base/files/file_util.h"
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 24 matching lines...) Expand all
35 size_t header_length, 35 size_t header_length,
36 size_t packet_length, 36 size_t packet_length,
37 bool incoming) override { 37 bool incoming) override {
38 current_dump_size_ += header_length; 38 current_dump_size_ += header_length;
39 if (current_dump_size_ > max_dump_size_) 39 if (current_dump_size_ > max_dump_size_)
40 max_size_reached_callback_.Run(); 40 max_size_reached_callback_.Run();
41 } 41 }
42 42
43 void EndDump(RtpDumpType type, 43 void EndDump(RtpDumpType type,
44 const EndDumpCallback& finished_callback) override { 44 const EndDumpCallback& finished_callback) override {
45 bool incoming_sucess = end_dump_success_; 45 bool incoming_success = end_dump_success_;
46 bool outgoing_success = end_dump_success_; 46 bool outgoing_success = end_dump_success_;
47 47
48 if (type == RTP_DUMP_INCOMING) 48 if (type == RTP_DUMP_INCOMING)
49 outgoing_success = false; 49 outgoing_success = false;
50 else if (type == RTP_DUMP_OUTGOING) 50 else if (type == RTP_DUMP_OUTGOING)
51 incoming_sucess = false; 51 incoming_success = false;
52 52
53 base::ThreadTaskRunnerHandle::Get()->PostTask( 53 base::ThreadTaskRunnerHandle::Get()->PostTask(
54 FROM_HERE, 54 FROM_HERE,
55 base::Bind(finished_callback, incoming_sucess, outgoing_success)); 55 base::Bind(finished_callback, incoming_success, outgoing_success));
56 } 56 }
57 57
58 private: 58 private:
59 size_t max_dump_size_; 59 size_t max_dump_size_;
60 size_t current_dump_size_; 60 size_t current_dump_size_;
61 base::Closure max_size_reached_callback_; 61 base::Closure max_size_reached_callback_;
62 bool end_dump_success_; 62 bool end_dump_success_;
63 }; 63 };
64 64
65 class WebRtcRtpDumpHandlerTest : public testing::Test { 65 class WebRtcRtpDumpHandlerTest : public testing::Test {
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 this, &WebRtcRtpDumpHandlerTest::DeleteDumpHandler)); 405 this, &WebRtcRtpDumpHandlerTest::DeleteDumpHandler));
406 406
407 EXPECT_TRUE(handler_->StartDump(RTP_DUMP_BOTH, &error)); 407 EXPECT_TRUE(handler_->StartDump(RTP_DUMP_BOTH, &error));
408 408
409 handler_->StopOngoingDumps( 409 handler_->StopOngoingDumps(
410 base::Bind(&WebRtcRtpDumpHandlerTest::OnStopOngoingDumpsFinished, 410 base::Bind(&WebRtcRtpDumpHandlerTest::OnStopOngoingDumpsFinished,
411 base::Unretained(this))); 411 base::Unretained(this)));
412 412
413 base::RunLoop().RunUntilIdle(); 413 base::RunLoop().RunUntilIdle();
414 } 414 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698