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

Unified Diff: net/socket/socket_test_util.cc

Issue 3029052: Recommit 54405 - Fix late binding induced mismatch of Socket and AuthController (Closed)
Patch Set: Created 10 years, 5 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') | net/socket/ssl_client_socket_pool.h » ('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 d4d74a74735c6f7fd66dc7700fad571e7898cd59..142a39e9c479b641767242f9f3d9221fc09d1217 100644
--- a/net/socket/socket_test_util.cc
+++ b/net/socket/socket_test_util.cc
@@ -187,6 +187,7 @@ int MockTCPClientSocket::Connect(net::CompletionCallback* callback) {
if (connected_)
return net::OK;
connected_ = true;
+ peer_closed_connection_ = false;
if (data_->connect_data().async) {
RunCallbackAsync(callback, data_->connect_data().result);
return net::ERR_IO_PENDING;
@@ -886,53 +887,6 @@ void MockSOCKSClientSocketPool::ReleaseSocket(const std::string& group_name,
MockSOCKSClientSocketPool::~MockSOCKSClientSocketPool() {}
-MockHttpAuthController::MockHttpAuthController()
- : HttpAuthController(HttpAuth::AUTH_PROXY, GURL(),
- scoped_refptr<HttpNetworkSession>(NULL)),
- data_(NULL),
- data_index_(0),
- data_count_(0) {
-}
-
-void MockHttpAuthController::SetMockAuthControllerData(
- struct MockHttpAuthControllerData* data, size_t count) {
- data_ = data;
- data_count_ = count;
-}
-
-int MockHttpAuthController::MaybeGenerateAuthToken(
- const HttpRequestInfo* request,
- CompletionCallback* callback,
- const BoundNetLog& net_log) {
- return OK;
-}
-
-void MockHttpAuthController::AddAuthorizationHeader(
- HttpRequestHeaders* authorization_headers) {
- authorization_headers->AddHeadersFromString(CurrentData().auth_header);
-}
-
-int MockHttpAuthController::HandleAuthChallenge(
- scoped_refptr<HttpResponseHeaders> headers,
- bool do_not_send_server_auth,
- bool establishing_tunnel,
- const BoundNetLog& net_log) {
- return OK;
-}
-
-void MockHttpAuthController::ResetAuth(const string16& username,
- const string16& password) {
- data_index_++;
-}
-
-bool MockHttpAuthController::HaveAuth() const {
- return CurrentData().auth_header.size() != 0;
-}
-
-bool MockHttpAuthController::HaveAuthHandler() const {
- return HaveAuth();
-}
-
const char kSOCKS5GreetRequest[] = { 0x05, 0x01, 0x00 };
const int kSOCKS5GreetRequestLength = arraysize(kSOCKS5GreetRequest);
« no previous file with comments | « net/socket/socket_test_util.h ('k') | net/socket/ssl_client_socket_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698