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

Side by Side Diff: chrome/browser/extensions/api/socket/mock_tcp_client_socket.h

Issue 1376473003: Notify NQE of TCP RTT values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added throttle on TCP socket notifications (with tests) Created 4 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CHROME_BROWSER_EXTENSIONS_API_SOCKET_MOCK_TCP_CLIENT_SOCKET_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SOCKET_MOCK_TCP_CLIENT_SOCKET_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_SOCKET_MOCK_TCP_CLIENT_SOCKET_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_SOCKET_MOCK_TCP_CLIENT_SOCKET_H_
7 7
8 #include "net/socket/tcp_client_socket.h" 8 #include "net/socket/tcp_client_socket.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 10
(...skipping 30 matching lines...) Expand all
41 MOCK_METHOD1(AddConnectionAttempts, void(const net::ConnectionAttempts&)); 41 MOCK_METHOD1(AddConnectionAttempts, void(const net::ConnectionAttempts&));
42 MOCK_CONST_METHOD0(GetTotalReceivedBytes, int64_t()); 42 MOCK_CONST_METHOD0(GetTotalReceivedBytes, int64_t());
43 43
44 // Methods specific to MockTCPClientSocket 44 // Methods specific to MockTCPClientSocket
45 MOCK_METHOD1(Bind, int(const net::IPEndPoint&)); 45 MOCK_METHOD1(Bind, int(const net::IPEndPoint&));
46 MOCK_METHOD2(SetKeepAlive, bool(bool, int)); 46 MOCK_METHOD2(SetKeepAlive, bool(bool, int));
47 MOCK_METHOD1(SetNoDelay, bool(bool)); 47 MOCK_METHOD1(SetNoDelay, bool(bool));
48 }; 48 };
49 49
50 MockTCPClientSocket::MockTCPClientSocket() 50 MockTCPClientSocket::MockTCPClientSocket()
51 : TCPClientSocket(net::AddressList(), nullptr, net::NetLog::Source()) {} 51 : TCPClientSocket(net::AddressList(),
52 nullptr,
53 nullptr,
54 net::NetLog::Source()) {}
52 MockTCPClientSocket::~MockTCPClientSocket() {} 55 MockTCPClientSocket::~MockTCPClientSocket() {}
53 56
54 } // namespace extensions 57 } // namespace extensions
55 58
56 #endif // CHROME_BROWSER_EXTENSIONS_API_SOCKET_MOCK_TCP_CLIENT_SOCKET_H_ 59 #endif // CHROME_BROWSER_EXTENSIONS_API_SOCKET_MOCK_TCP_CLIENT_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698