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

Side by Side Diff: chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc

Issue 16998003: Update CrOS to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/dbus/proxy_resolution_service_provider.h" 5 #include "chrome/browser/chromeos/dbus/proxy_resolution_service_provider.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/threading/platform_thread.h" 9 #include "base/threading/platform_thread.h"
10 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/profiles/profile_manager.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 private: 109 private:
110 // Helper function for ResolveProxy(). 110 // Helper function for ResolveProxy().
111 static void ResolveProxyInternal( 111 static void ResolveProxyInternal(
112 Request* request, 112 Request* request,
113 scoped_refptr<net::URLRequestContextGetter> getter, 113 scoped_refptr<net::URLRequestContextGetter> getter,
114 scoped_refptr<dbus::ExportedObject> exported_object) { 114 scoped_refptr<dbus::ExportedObject> exported_object) {
115 // Make sure we're running on IO thread. 115 // Make sure we're running on IO thread.
116 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 116 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
117 117
118 // Check if we have the URLRequestContextGetter. 118 // Check if we have the URLRequestContextGetter.
119 if (!getter) { 119 if (!getter.get()) {
120 request->error_ = "No URLRequestContextGetter"; 120 request->error_ = "No URLRequestContextGetter";
121 request->OnCompletion(net::ERR_UNEXPECTED); 121 request->OnCompletion(net::ERR_UNEXPECTED);
122 return; 122 return;
123 } 123 }
124 124
125 // Retrieve ProxyService from profile's request context. 125 // Retrieve ProxyService from profile's request context.
126 net::ProxyService* proxy_service = 126 net::ProxyService* proxy_service =
127 getter->GetURLRequestContext()->proxy_service(); 127 getter->GetURLRequestContext()->proxy_service();
128 if (!proxy_service) { 128 if (!proxy_service) {
129 request->error_ = "No proxy service in chrome"; 129 request->error_ = "No proxy service in chrome";
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 ProxyResolutionServiceProvider* 272 ProxyResolutionServiceProvider*
273 ProxyResolutionServiceProvider::CreateForTesting( 273 ProxyResolutionServiceProvider::CreateForTesting(
274 ProxyResolverInterface* resolver) { 274 ProxyResolverInterface* resolver) {
275 return new ProxyResolutionServiceProvider(resolver); 275 return new ProxyResolutionServiceProvider(resolver);
276 } 276 }
277 277
278 ProxyResolverInterface::~ProxyResolverInterface() { 278 ProxyResolverInterface::~ProxyResolverInterface() {
279 } 279 }
280 280
281 } // namespace chromeos 281 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698