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

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

Issue 15829004: Update net/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: license twerk Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/proxy/mock_proxy_resolver.h ('k') | net/proxy/multi_threaded_proxy_resolver.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/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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 if (request_handle) 62 if (request_handle)
63 *request_handle = reinterpret_cast<RequestHandle>(request.get()); 63 *request_handle = reinterpret_cast<RequestHandle>(request.get());
64 64
65 // Test code completes the request by calling request->CompleteNow(). 65 // Test code completes the request by calling request->CompleteNow().
66 return ERR_IO_PENDING; 66 return ERR_IO_PENDING;
67 } 67 }
68 68
69 void MockAsyncProxyResolverBase::CancelRequest(RequestHandle request_handle) { 69 void MockAsyncProxyResolverBase::CancelRequest(RequestHandle request_handle) {
70 scoped_refptr<Request> request = reinterpret_cast<Request*>(request_handle); 70 scoped_refptr<Request> request = reinterpret_cast<Request*>(request_handle);
71 cancelled_requests_.push_back(request); 71 cancelled_requests_.push_back(request);
72 RemovePendingRequest(request); 72 RemovePendingRequest(request.get());
73 } 73 }
74 74
75 LoadState MockAsyncProxyResolverBase::GetLoadState( 75 LoadState MockAsyncProxyResolverBase::GetLoadState(
76 RequestHandle request_handle) const { 76 RequestHandle request_handle) const {
77 return LOAD_STATE_RESOLVING_PROXY_FOR_URL; 77 return LOAD_STATE_RESOLVING_PROXY_FOR_URL;
78 } 78 }
79 79
80 int MockAsyncProxyResolverBase::SetPacScript( 80 int MockAsyncProxyResolverBase::SetPacScript(
81 const scoped_refptr<ProxyResolverScriptData>& script_data, 81 const scoped_refptr<ProxyResolverScriptData>& script_data,
82 const CompletionCallback& callback) { 82 const CompletionCallback& callback) {
(...skipping 23 matching lines...) Expand all
106 void MockAsyncProxyResolverBase::RemovePendingSetPacScriptRequest( 106 void MockAsyncProxyResolverBase::RemovePendingSetPacScriptRequest(
107 SetPacScriptRequest* request) { 107 SetPacScriptRequest* request) {
108 DCHECK_EQ(request, pending_set_pac_script_request()); 108 DCHECK_EQ(request, pending_set_pac_script_request());
109 pending_set_pac_script_request_.reset(); 109 pending_set_pac_script_request_.reset();
110 } 110 }
111 111
112 MockAsyncProxyResolverBase::MockAsyncProxyResolverBase(bool expects_pac_bytes) 112 MockAsyncProxyResolverBase::MockAsyncProxyResolverBase(bool expects_pac_bytes)
113 : ProxyResolver(expects_pac_bytes) {} 113 : ProxyResolver(expects_pac_bytes) {}
114 114
115 } // namespace net 115 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/mock_proxy_resolver.h ('k') | net/proxy/multi_threaded_proxy_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698