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

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: Rebase. 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
« no previous file with comments | « net/socket/socket_test_util.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socket_test_util.cc
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc
index f4b804bf4fb35698c65ac13ee3d4ca2c922e6133..04f5151d4fe7f0293ff62908e1036dc5057d437d 100644
--- a/net/socket/socket_test_util.cc
+++ b/net/socket/socket_test_util.cc
@@ -35,7 +35,6 @@
#define NET_TRACE(level, s) VLOG(level) << s << __FUNCTION__ << "() "
namespace net {
-
namespace {
inline char AsciifyHigh(char x) {
@@ -1245,6 +1244,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)),
@@ -1343,16 +1343,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) {
« no previous file with comments | « net/socket/socket_test_util.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698