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

Side by Side Diff: net/proxy/multi_threaded_proxy_resolver_unittest.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: Address eroman's nits. Created 9 years, 1 month 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
« no previous file with comments | « net/proxy/multi_threaded_proxy_resolver.cc ('k') | net/proxy/proxy_resolver.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/multi_threaded_proxy_resolver.h" 5 #include "net/proxy/multi_threaded_proxy_resolver.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 results->UseNamedProxy(query_url.host()); 55 results->UseNamedProxy(query_url.host());
56 56
57 // Return a success code which represents the request's order. 57 // Return a success code which represents the request's order.
58 return request_count_++; 58 return request_count_++;
59 } 59 }
60 60
61 virtual void CancelRequest(RequestHandle request) OVERRIDE { 61 virtual void CancelRequest(RequestHandle request) OVERRIDE {
62 NOTREACHED(); 62 NOTREACHED();
63 } 63 }
64 64
65 virtual LoadState GetLoadState(RequestHandle request) const OVERRIDE {
66 NOTREACHED();
67 return LOAD_STATE_IDLE;
68 }
69
70 virtual LoadState GetLoadStateThreadSafe(
71 RequestHandle request) const OVERRIDE {
72 NOTREACHED();
73 return LOAD_STATE_IDLE;
74 }
75
65 virtual void CancelSetPacScript() OVERRIDE { 76 virtual void CancelSetPacScript() OVERRIDE {
66 NOTREACHED(); 77 NOTREACHED();
67 } 78 }
68 79
69 virtual int SetPacScript( 80 virtual int SetPacScript(
70 const scoped_refptr<ProxyResolverScriptData>& script_data, 81 const scoped_refptr<ProxyResolverScriptData>& script_data,
71 OldCompletionCallback* callback) OVERRIDE { 82 OldCompletionCallback* callback) OVERRIDE {
72 CheckIsOnWorkerThread(); 83 CheckIsOnWorkerThread();
73 last_script_data_ = script_data; 84 last_script_data_ = script_data;
74 return OK; 85 return OK;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 RequestHandle* request, 179 RequestHandle* request,
169 const BoundNetLog& net_log) OVERRIDE { 180 const BoundNetLog& net_log) OVERRIDE {
170 return impl_->GetProxyForURL( 181 return impl_->GetProxyForURL(
171 query_url, results, callback, request, net_log); 182 query_url, results, callback, request, net_log);
172 } 183 }
173 184
174 virtual void CancelRequest(RequestHandle request) OVERRIDE { 185 virtual void CancelRequest(RequestHandle request) OVERRIDE {
175 impl_->CancelRequest(request); 186 impl_->CancelRequest(request);
176 } 187 }
177 188
189 virtual LoadState GetLoadState(RequestHandle request) const OVERRIDE {
190 NOTREACHED();
191 return LOAD_STATE_IDLE;
192 }
193
194 virtual LoadState GetLoadStateThreadSafe(
195 RequestHandle request) const OVERRIDE {
196 NOTREACHED();
197 return LOAD_STATE_IDLE;
198 }
199
178 virtual void CancelSetPacScript() OVERRIDE { 200 virtual void CancelSetPacScript() OVERRIDE {
179 impl_->CancelSetPacScript(); 201 impl_->CancelSetPacScript();
180 } 202 }
181 203
182 virtual int SetPacScript( 204 virtual int SetPacScript(
183 const scoped_refptr<ProxyResolverScriptData>& script_data, 205 const scoped_refptr<ProxyResolverScriptData>& script_data,
184 OldCompletionCallback* callback) OVERRIDE { 206 OldCompletionCallback* callback) OVERRIDE {
185 return impl_->SetPacScript(script_data, callback); 207 return impl_->SetPacScript(script_data, callback);
186 } 208 }
187 209
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 // All in all, the first thread should have seen just 1 request. And the 790 // All in all, the first thread should have seen just 1 request. And the
769 // second thread 3 requests. 791 // second thread 3 requests.
770 ASSERT_EQ(2u, factory->resolvers().size()); 792 ASSERT_EQ(2u, factory->resolvers().size());
771 EXPECT_EQ(1, factory->resolvers()[0]->request_count()); 793 EXPECT_EQ(1, factory->resolvers()[0]->request_count());
772 EXPECT_EQ(3, factory->resolvers()[1]->request_count()); 794 EXPECT_EQ(3, factory->resolvers()[1]->request_count());
773 } 795 }
774 796
775 } // namespace 797 } // namespace
776 798
777 } // namespace net 799 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/multi_threaded_proxy_resolver.cc ('k') | net/proxy/proxy_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698