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

Side by Side Diff: net/proxy/mock_proxy_resolver.cc

Issue 8373014: Add new text for indicating we are resolving hosts during proxy resolution. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Oops Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "net/proxy/mock_proxy_resolver.h" 5 #include "net/proxy/mock_proxy_resolver.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Test code completes the request by calling request->CompleteNow(). 70 // Test code completes the request by calling request->CompleteNow().
71 return ERR_IO_PENDING; 71 return ERR_IO_PENDING;
72 } 72 }
73 73
74 void MockAsyncProxyResolverBase::CancelRequest(RequestHandle request_handle) { 74 void MockAsyncProxyResolverBase::CancelRequest(RequestHandle request_handle) {
75 scoped_refptr<Request> request = reinterpret_cast<Request*>(request_handle); 75 scoped_refptr<Request> request = reinterpret_cast<Request*>(request_handle);
76 cancelled_requests_.push_back(request); 76 cancelled_requests_.push_back(request);
77 RemovePendingRequest(request); 77 RemovePendingRequest(request);
78 } 78 }
79 79
80 LoadState MockAsyncProxyResolverBase::GetLoadState(
81 RequestHandle request_handle) const {
82 NOTREACHED();
83 return LOAD_STATE_IDLE;
84 }
85
80 int MockAsyncProxyResolverBase::SetPacScript( 86 int MockAsyncProxyResolverBase::SetPacScript(
81 const scoped_refptr<ProxyResolverScriptData>& script_data, 87 const scoped_refptr<ProxyResolverScriptData>& script_data,
82 OldCompletionCallback* callback) { 88 OldCompletionCallback* callback) {
83 DCHECK(!pending_set_pac_script_request_.get()); 89 DCHECK(!pending_set_pac_script_request_.get());
84 pending_set_pac_script_request_.reset( 90 pending_set_pac_script_request_.reset(
85 new SetPacScriptRequest(this, script_data, callback)); 91 new SetPacScriptRequest(this, script_data, callback));
86 // Finished when user calls SetPacScriptRequest::CompleteNow(). 92 // Finished when user calls SetPacScriptRequest::CompleteNow().
87 return ERR_IO_PENDING; 93 return ERR_IO_PENDING;
88 } 94 }
89 95
(...skipping 16 matching lines...) Expand all
106 void MockAsyncProxyResolverBase::RemovePendingSetPacScriptRequest( 112 void MockAsyncProxyResolverBase::RemovePendingSetPacScriptRequest(
107 SetPacScriptRequest* request) { 113 SetPacScriptRequest* request) {
108 DCHECK_EQ(request, pending_set_pac_script_request()); 114 DCHECK_EQ(request, pending_set_pac_script_request());
109 pending_set_pac_script_request_.reset(); 115 pending_set_pac_script_request_.reset();
110 } 116 }
111 117
112 MockAsyncProxyResolverBase::MockAsyncProxyResolverBase(bool expects_pac_bytes) 118 MockAsyncProxyResolverBase::MockAsyncProxyResolverBase(bool expects_pac_bytes)
113 : ProxyResolver(expects_pac_bytes) {} 119 : ProxyResolver(expects_pac_bytes) {}
114 120
115 } // namespace net 121 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698