| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/chromeos/dbus/chrome_proxy_resolver_delegate.h" | |
| 6 | |
| 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" | |
| 11 | |
| 12 namespace chromeos { | |
| 13 | |
| 14 ChromeProxyResolverDelegate::ChromeProxyResolverDelegate() {} | |
| 15 | |
| 16 ChromeProxyResolverDelegate::~ChromeProxyResolverDelegate() {} | |
| 17 | |
| 18 scoped_refptr<net::URLRequestContextGetter> | |
| 19 ChromeProxyResolverDelegate::GetRequestContext() { | |
| 20 Profile* profile = ProfileManager::GetPrimaryUserProfile(); | |
| 21 return profile->GetRequestContext(); | |
| 22 } | |
| 23 | |
| 24 int ChromeProxyResolverDelegate::ResolveProxy( | |
| 25 net::ProxyService* proxy_service, | |
| 26 const GURL& url, | |
| 27 net::ProxyInfo* results, | |
| 28 const net::CompletionCallback& callback) { | |
| 29 DCHECK(proxy_service); | |
| 30 DCHECK(results); | |
| 31 return proxy_service->ResolveProxy(url, std::string(), results, callback, | |
| 32 nullptr, nullptr, net::NetLogWithSource()); | |
| 33 } | |
| 34 | |
| 35 } // namespace chromeos | |
| OLD | NEW |