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/proxy_resolver_js_bindings_unittest.cc

Issue 8549004: base::Bind: Convert HostResolver::Resolve. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. 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 | Annotate | Revision Log
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/proxy/sync_host_resolver_bridge.cc » ('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/proxy_resolver_js_bindings.h" 5 #include "net/proxy/proxy_resolver_js_bindings.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "net/base/address_list.h" 10 #include "net/base/address_list.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 }; 66 };
67 67
68 class MockSyncHostResolver : public SyncHostResolver { 68 class MockSyncHostResolver : public SyncHostResolver {
69 public: 69 public:
70 MockSyncHostResolver() { 70 MockSyncHostResolver() {
71 resolver_.set_synchronous_mode(true); 71 resolver_.set_synchronous_mode(true);
72 } 72 }
73 73
74 virtual int Resolve(const HostResolver::RequestInfo& info, 74 virtual int Resolve(const HostResolver::RequestInfo& info,
75 AddressList* addresses) OVERRIDE { 75 AddressList* addresses) OVERRIDE {
76 return resolver_.Resolve(info, addresses, NULL, NULL, BoundNetLog()); 76 return resolver_.Resolve(info, addresses, CompletionCallback(), NULL,
77 BoundNetLog());
77 } 78 }
78 79
79 virtual void Shutdown() OVERRIDE {} 80 virtual void Shutdown() OVERRIDE {}
80 81
81 RuleBasedHostResolverProc* rules() { 82 RuleBasedHostResolverProc* rules() {
82 return resolver_.rules(); 83 return resolver_.rules();
83 } 84 }
84 85
85 private: 86 private:
86 MockHostResolver resolver_; 87 MockHostResolver resolver_;
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 global_log.GetEntries(&global_log_entries); 353 global_log.GetEntries(&global_log_entries);
353 EXPECT_EQ(2u, global_log_entries.size()); 354 EXPECT_EQ(2u, global_log_entries.size());
354 EXPECT_TRUE(LogContainsEvent( 355 EXPECT_TRUE(LogContainsEvent(
355 global_log_entries, 1, NetLog::TYPE_PAC_JAVASCRIPT_ALERT, 356 global_log_entries, 1, NetLog::TYPE_PAC_JAVASCRIPT_ALERT,
356 NetLog::PHASE_NONE)); 357 NetLog::PHASE_NONE));
357 } 358 }
358 359
359 } // namespace 360 } // namespace
360 361
361 } // namespace net 362 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/proxy/sync_host_resolver_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698