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

Unified Diff: net/socket/socket_test_util.cc

Issue 1327923002: Migrates QUIC sessions to a new network when old network is (about to be) disconnected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Addresses rch's comments. Created 4 years, 11 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: net/socket/socket_test_util.cc
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc
index 96515c33779d6fb692bd249714aea857d6229d00..2ded20f2e36d82ea4fe747bcadeafcaaf2f02cd8 100644
--- a/net/socket/socket_test_util.cc
+++ b/net/socket/socket_test_util.cc
@@ -1243,6 +1243,7 @@ MockUDPClientSocket::MockUDPClientSocket(SocketDataProvider* data,
read_data_(SYNCHRONOUS, ERR_UNEXPECTED),
need_read_data_(true),
source_port_(123),
+ network_(NetworkChangeNotifier::kInvalidNetworkHandle),
pending_read_buf_(NULL),
pending_read_buf_len_(0),
net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_NONE)),
@@ -1341,16 +1342,18 @@ const BoundNetLog& MockUDPClientSocket::NetLog() const {
int MockUDPClientSocket::BindToNetwork(
NetworkChangeNotifier::NetworkHandle network) {
- return ERR_NOT_IMPLEMENTED;
+ network_ = network;
+ return OK;
}
int MockUDPClientSocket::BindToDefaultNetwork() {
- return ERR_NOT_IMPLEMENTED;
+ network_ = kDefaultNetworkForTests;
+ return OK;
}
NetworkChangeNotifier::NetworkHandle MockUDPClientSocket::GetBoundNetwork()
const {
- return NetworkChangeNotifier::kInvalidNetworkHandle;
+ return network_;
}
int MockUDPClientSocket::Connect(const IPEndPoint& address) {

Powered by Google App Engine
This is Rietveld 408576698