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

Unified Diff: chrome/browser/extensions/api/cast_streaming/performance_test.cc

Issue 721273002: Remove timing limitation to set Broadcast, ReceiveBuffer, and SendBuffer options from UDPSocket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/cast_streaming/performance_test.cc
diff --git a/chrome/browser/extensions/api/cast_streaming/performance_test.cc b/chrome/browser/extensions/api/cast_streaming/performance_test.cc
index 2615d3f123685aa9c4769da0fd32693758ea4f3b..32b360cc8fff21445f16c827e9e264caebe1a3de 100644
--- a/chrome/browser/extensions/api/cast_streaming/performance_test.cc
+++ b/chrome/browser/extensions/api/cast_streaming/performance_test.cc
@@ -48,7 +48,7 @@
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
#include "net/base/rand_callback.h"
-#include "net/udp/udp_socket.h"
+#include "net/udp/udp_server_socket.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/perf/perf_test.h"
#include "ui/compositor/compositor_switches.h"
@@ -343,13 +343,10 @@ class CastV2PerformanceTest
localhost.push_back(0);
localhost.push_back(0);
localhost.push_back(1);
- scoped_ptr<net::UDPSocket> receive_socket(
- new net::UDPSocket(net::DatagramSocket::DEFAULT_BIND,
- net::RandIntCallback(),
- NULL,
- net::NetLog::Source()));
+ scoped_ptr<net::UDPServerSocket> receive_socket(
+ new net::UDPServerSocket(NULL, net::NetLog::Source()));
receive_socket->AllowAddressReuse();
- CHECK_EQ(net::OK, receive_socket->Bind(net::IPEndPoint(localhost, 0)));
+ CHECK_EQ(net::OK, receive_socket->Listen(net::IPEndPoint(localhost, 0)));
net::IPEndPoint endpoint;
CHECK_EQ(net::OK, receive_socket->GetLocalAddress(&endpoint));
return endpoint;

Powered by Google App Engine
This is Rietveld 408576698