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

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

Issue 2772573002: chromeos: Improve ProxyResolutionServiceProvider testing. (Closed)
Patch Set: Created 3 years, 9 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_resolver_delegate.h" 5 #include "chrome/browser/chromeos/dbus/chrome_proxy_resolver_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"
8 #include "net/url_request/url_request_context_getter.h" 10 #include "net/url_request/url_request_context_getter.h"
9 11
10 namespace chromeos { 12 namespace chromeos {
11 13
12 ChromeProxyResolverDelegate::ChromeProxyResolverDelegate() {} 14 ChromeProxyResolverDelegate::ChromeProxyResolverDelegate() {}
13 15
14 ChromeProxyResolverDelegate::~ChromeProxyResolverDelegate() {} 16 ChromeProxyResolverDelegate::~ChromeProxyResolverDelegate() {}
15 17
16 scoped_refptr<net::URLRequestContextGetter> 18 scoped_refptr<net::URLRequestContextGetter>
17 ChromeProxyResolverDelegate::GetRequestContext() { 19 ChromeProxyResolverDelegate::GetRequestContext() {
18 Profile* profile = ProfileManager::GetPrimaryUserProfile(); 20 Profile* profile = ProfileManager::GetPrimaryUserProfile();
19 return profile->GetRequestContext(); 21 return profile->GetRequestContext();
20 } 22 }
21 23
24 int ChromeProxyResolverDelegate::ResolveProxy(
25 net::ProxyService* proxy_service,
26 const GURL& url,
27 net::ProxyInfo* results,
James Cook 2017/03/22 23:16:27 DCHECK this?
Daniel Erat 2017/03/22 23:23:40 i wasn't sure if that was keeping in the spirit of
28 const net::CompletionCallback& callback) {
29 DCHECK(proxy_service);
30 return proxy_service->ResolveProxy(url, std::string(), results, callback,
Daniel Erat 2017/03/22 22:58:56 i don't love adding tiny shims like this that just
31 nullptr, nullptr, net::NetLogWithSource());
32 }
33
22 } // namespace chromeos 34 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698