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

Unified Diff: remoting/protocol/connection_to_client_unittest.cc

Issue 9827006: Refactor VideoStub interface to accept ownership of video packets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/client_control_dispatcher.cc ('k') | remoting/protocol/host_control_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_to_client_unittest.cc
diff --git a/remoting/protocol/connection_to_client_unittest.cc b/remoting/protocol/connection_to_client_unittest.cc
index 0ad3168dc555a80180cad3484bf60638c77e0128..456aca11a175fee54a812645a7993173b370770b 100644
--- a/remoting/protocol/connection_to_client_unittest.cc
+++ b/remoting/protocol/connection_to_client_unittest.cc
@@ -64,10 +64,8 @@ class ConnectionToClientTest : public testing::Test {
};
TEST_F(ConnectionToClientTest, SendUpdateStream) {
- // Then send the actual data.
- VideoPacket* packet = new VideoPacket();
- viewer_->video_stub()->ProcessVideoPacket(
- packet, base::Bind(&base::DeletePointer<VideoPacket>, packet));
+ scoped_ptr<VideoPacket> packet(new VideoPacket());
+ viewer_->video_stub()->ProcessVideoPacket(packet.Pass(), base::Closure());
message_loop_.RunAllPending();
@@ -84,10 +82,8 @@ TEST_F(ConnectionToClientTest, SendUpdateStream) {
}
TEST_F(ConnectionToClientTest, NoWriteAfterDisconnect) {
- // Then send the actual data.
- VideoPacket* packet = new VideoPacket();
- viewer_->video_stub()->ProcessVideoPacket(
- packet, base::Bind(&base::DeletePointer<VideoPacket>, packet));
+ scoped_ptr<VideoPacket> packet(new VideoPacket());
+ viewer_->video_stub()->ProcessVideoPacket(packet.Pass(), base::Closure());
// And then close the connection to ConnectionToClient.
viewer_->Disconnect();
« no previous file with comments | « remoting/protocol/client_control_dispatcher.cc ('k') | remoting/protocol/host_control_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698