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

Side by Side Diff: net/socket/socket_test_util.h

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: More tests added and some fixes. Created 4 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_ 5 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_
6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_ 6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 bool connected_; 757 bool connected_;
758 SocketDataProvider* data_; 758 SocketDataProvider* data_;
759 int read_offset_; 759 int read_offset_;
760 MockRead read_data_; 760 MockRead read_data_;
761 bool need_read_data_; 761 bool need_read_data_;
762 uint16_t source_port_; // Ephemeral source port. 762 uint16_t source_port_; // Ephemeral source port.
763 763
764 // Address of the "remote" peer we're connected to. 764 // Address of the "remote" peer we're connected to.
765 IPEndPoint peer_addr_; 765 IPEndPoint peer_addr_;
766 766
767 // Network that the socket is bound to.
768 NetworkChangeNotifier::NetworkHandle network_;
769
767 // While an asynchronous IO is pending, we save our user-buffer state. 770 // While an asynchronous IO is pending, we save our user-buffer state.
768 scoped_refptr<IOBuffer> pending_read_buf_; 771 scoped_refptr<IOBuffer> pending_read_buf_;
769 int pending_read_buf_len_; 772 int pending_read_buf_len_;
770 CompletionCallback pending_read_callback_; 773 CompletionCallback pending_read_callback_;
771 CompletionCallback pending_write_callback_; 774 CompletionCallback pending_write_callback_;
772 775
773 BoundNetLog net_log_; 776 BoundNetLog net_log_;
774 777
775 base::WeakPtrFactory<MockUDPClientSocket> weak_factory_; 778 base::WeakPtrFactory<MockUDPClientSocket> weak_factory_;
776 779
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 990
988 // Helper function to get the total data size of the MockReads in |reads|. 991 // Helper function to get the total data size of the MockReads in |reads|.
989 int64_t CountReadBytes(const MockRead reads[], size_t reads_size); 992 int64_t CountReadBytes(const MockRead reads[], size_t reads_size);
990 993
991 // Helper function to get the total data size of the MockWrites in |writes|. 994 // Helper function to get the total data size of the MockWrites in |writes|.
992 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size); 995 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size);
993 996
994 } // namespace net 997 } // namespace net
995 998
996 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ 999 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698