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

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

Issue 11885009: Improve performance of proxy resolver by tracing DNS dependencies. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: that's what she said Created 7 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 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 cancelled_requests_.push_back(request); 72 cancelled_requests_.push_back(request);
73 RemovePendingRequest(request); 73 RemovePendingRequest(request);
74 } 74 }
75 75
76 LoadState MockAsyncProxyResolverBase::GetLoadState( 76 LoadState MockAsyncProxyResolverBase::GetLoadState(
77 RequestHandle request_handle) const { 77 RequestHandle request_handle) const {
78 NOTREACHED(); 78 NOTREACHED();
79 return LOAD_STATE_IDLE; 79 return LOAD_STATE_IDLE;
80 } 80 }
81 81
82 LoadState MockAsyncProxyResolverBase::GetLoadStateThreadSafe(
83 RequestHandle request_handle) const {
84 NOTREACHED();
85 return LOAD_STATE_IDLE;
86 }
87
88 int MockAsyncProxyResolverBase::SetPacScript( 82 int MockAsyncProxyResolverBase::SetPacScript(
89 const scoped_refptr<ProxyResolverScriptData>& script_data, 83 const scoped_refptr<ProxyResolverScriptData>& script_data,
90 const CompletionCallback& callback) { 84 const CompletionCallback& callback) {
91 DCHECK(!pending_set_pac_script_request_.get()); 85 DCHECK(!pending_set_pac_script_request_.get());
92 pending_set_pac_script_request_.reset( 86 pending_set_pac_script_request_.reset(
93 new SetPacScriptRequest(this, script_data, callback)); 87 new SetPacScriptRequest(this, script_data, callback));
94 // Finished when user calls SetPacScriptRequest::CompleteNow(). 88 // Finished when user calls SetPacScriptRequest::CompleteNow().
95 return ERR_IO_PENDING; 89 return ERR_IO_PENDING;
96 } 90 }
97 91
(...skipping 16 matching lines...) Expand all
114 void MockAsyncProxyResolverBase::RemovePendingSetPacScriptRequest( 108 void MockAsyncProxyResolverBase::RemovePendingSetPacScriptRequest(
115 SetPacScriptRequest* request) { 109 SetPacScriptRequest* request) {
116 DCHECK_EQ(request, pending_set_pac_script_request()); 110 DCHECK_EQ(request, pending_set_pac_script_request());
117 pending_set_pac_script_request_.reset(); 111 pending_set_pac_script_request_.reset();
118 } 112 }
119 113
120 MockAsyncProxyResolverBase::MockAsyncProxyResolverBase(bool expects_pac_bytes) 114 MockAsyncProxyResolverBase::MockAsyncProxyResolverBase(bool expects_pac_bytes)
121 : ProxyResolver(expects_pac_bytes) {} 115 : ProxyResolver(expects_pac_bytes) {}
122 116
123 } // namespace net 117 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698