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

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
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 2e16de720ee0b77a0019bb42cdf168bb8e77fb2f..62830647607f4f3d39eea6e0c6e1fd66857317f8 100644
--- a/remoting/protocol/connection_to_client_unittest.cc
+++ b/remoting/protocol/connection_to_client_unittest.cc
@@ -63,10 +63,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();
@@ -83,10 +81,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();

Powered by Google App Engine
This is Rietveld 408576698