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

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

Issue 2787253002: chromeos: Simplify D-Bus proxy provider (but not tests). (Closed)
Patch Set: remove error stuff from tests Created 3 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chrome_proxy_resolution_service_provider_ delegate.h" 5 #include "chrome/browser/chromeos/dbus/chrome_proxy_resolution_service_provider_ delegate.h"
6 6
7 #include "chrome/browser/profiles/profile_manager.h" 7 #include "chrome/browser/profiles/profile_manager.h"
8 #include "net/log/net_log_with_source.h"
9 #include "net/proxy/proxy_service.h"
10 #include "net/url_request/url_request_context_getter.h" 8 #include "net/url_request/url_request_context_getter.h"
11 9
12 namespace chromeos { 10 namespace chromeos {
13 11
14 ChromeProxyResolutionServiceProviderDelegate:: 12 ChromeProxyResolutionServiceProviderDelegate::
15 ChromeProxyResolutionServiceProviderDelegate() {} 13 ChromeProxyResolutionServiceProviderDelegate() {}
16 14
17 ChromeProxyResolutionServiceProviderDelegate:: 15 ChromeProxyResolutionServiceProviderDelegate::
18 ~ChromeProxyResolutionServiceProviderDelegate() {} 16 ~ChromeProxyResolutionServiceProviderDelegate() {}
19 17
20 scoped_refptr<net::URLRequestContextGetter> 18 scoped_refptr<net::URLRequestContextGetter>
21 ChromeProxyResolutionServiceProviderDelegate::GetRequestContext() { 19 ChromeProxyResolutionServiceProviderDelegate::GetRequestContext() {
22 Profile* profile = ProfileManager::GetPrimaryUserProfile(); 20 Profile* profile = ProfileManager::GetPrimaryUserProfile();
23 return profile->GetRequestContext(); 21 return profile->GetRequestContext();
24 } 22 }
25 23
26 int ChromeProxyResolutionServiceProviderDelegate::ResolveProxy(
27 net::ProxyService* proxy_service,
28 const GURL& url,
29 net::ProxyInfo* results,
30 const net::CompletionCallback& callback) {
31 DCHECK(proxy_service);
32 DCHECK(results);
33 return proxy_service->ResolveProxy(url, std::string(), results, callback,
34 nullptr, nullptr, net::NetLogWithSource());
35 }
36
37 } // namespace chromeos 24 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698