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

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: 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/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
65 virtual void CancelSetPacScript() OVERRIDE { 70 virtual void CancelSetPacScript() OVERRIDE {
66 NOTREACHED(); 71 NOTREACHED();
67 } 72 }
68 73
69 virtual int SetPacScript( 74 virtual int SetPacScript(
70 const scoped_refptr<ProxyResolverScriptData>& script_data, 75 const scoped_refptr<ProxyResolverScriptData>& script_data,
71 OldCompletionCallback* callback) OVERRIDE { 76 OldCompletionCallback* callback) OVERRIDE {
72 CheckIsOnWorkerThread(); 77 CheckIsOnWorkerThread();
73 last_script_data_ = script_data; 78 last_script_data_ = script_data;
74 return OK; 79 return OK;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 RequestHandle* request, 173 RequestHandle* request,
169 const BoundNetLog& net_log) OVERRIDE { 174 const BoundNetLog& net_log) OVERRIDE {
170 return impl_->GetProxyForURL( 175 return impl_->GetProxyForURL(
171 query_url, results, callback, request, net_log); 176 query_url, results, callback, request, net_log);
172 } 177 }
173 178
174 virtual void CancelRequest(RequestHandle request) OVERRIDE { 179 virtual void CancelRequest(RequestHandle request) OVERRIDE {
175 impl_->CancelRequest(request); 180 impl_->CancelRequest(request);
176 } 181 }
177 182
183 virtual LoadState GetLoadState(RequestHandle request) const OVERRIDE {
184 NOTREACHED();
185 return LOAD_STATE_IDLE;
186 }
187
178 virtual void CancelSetPacScript() OVERRIDE { 188 virtual void CancelSetPacScript() OVERRIDE {
179 impl_->CancelSetPacScript(); 189 impl_->CancelSetPacScript();
180 } 190 }
181 191
182 virtual int SetPacScript( 192 virtual int SetPacScript(
183 const scoped_refptr<ProxyResolverScriptData>& script_data, 193 const scoped_refptr<ProxyResolverScriptData>& script_data,
184 OldCompletionCallback* callback) OVERRIDE { 194 OldCompletionCallback* callback) OVERRIDE {
185 return impl_->SetPacScript(script_data, callback); 195 return impl_->SetPacScript(script_data, callback);
186 } 196 }
187 197
(...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 778 // All in all, the first thread should have seen just 1 request. And the
769 // second thread 3 requests. 779 // second thread 3 requests.
770 ASSERT_EQ(2u, factory->resolvers().size()); 780 ASSERT_EQ(2u, factory->resolvers().size());
771 EXPECT_EQ(1, factory->resolvers()[0]->request_count()); 781 EXPECT_EQ(1, factory->resolvers()[0]->request_count());
772 EXPECT_EQ(3, factory->resolvers()[1]->request_count()); 782 EXPECT_EQ(3, factory->resolvers()[1]->request_count());
773 } 783 }
774 784
775 } // namespace 785 } // namespace
776 786
777 } // namespace net 787 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698