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

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

Issue 332313003: Add Finch experiment for selectively bypassing proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: somehow missed a chromeos ResolveProxy invocation Created 6 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/io_thread.h » ('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) 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"
11 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
12 #include "dbus/bus.h" 12 #include "dbus/bus.h"
13 #include "dbus/message.h" 13 #include "dbus/message.h"
14 #include "dbus/exported_object.h" 14 #include "dbus/exported_object.h"
15 #include "net/base/load_flags.h"
15 #include "net/base/net_errors.h" 16 #include "net/base/net_errors.h"
16 #include "net/proxy/proxy_service.h" 17 #include "net/proxy/proxy_service.h"
17 #include "net/url_request/url_request_context.h" 18 #include "net/url_request/url_request_context.h"
18 #include "net/url_request/url_request_context_getter.h" 19 #include "net/url_request/url_request_context_getter.h"
19 #include "third_party/cros_system_api/dbus/service_constants.h" 20 #include "third_party/cros_system_api/dbus/service_constants.h"
20 21
21 using content::BrowserThread; 22 using content::BrowserThread;
22 23
23 namespace chromeos { 24 namespace chromeos {
24 25
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 getter->GetURLRequestContext()->proxy_service(); 128 getter->GetURLRequestContext()->proxy_service();
128 if (!proxy_service) { 129 if (!proxy_service) {
129 request->error_ = "No proxy service in chrome"; 130 request->error_ = "No proxy service in chrome";
130 request->OnCompletion(net::ERR_UNEXPECTED); 131 request->OnCompletion(net::ERR_UNEXPECTED);
131 return; 132 return;
132 } 133 }
133 134
134 VLOG(1) << "Starting network proxy resolution for " 135 VLOG(1) << "Starting network proxy resolution for "
135 << request->source_url_; 136 << request->source_url_;
136 const int result = proxy_service->ResolveProxy( 137 const int result = proxy_service->ResolveProxy(
137 GURL(request->source_url_), &request->proxy_info_, 138 GURL(request->source_url_), net::LOAD_NORMAL, &request->proxy_info_,
138 request->callback_, NULL, net::BoundNetLog()); 139 request->callback_, NULL, NULL, net::BoundNetLog());
139 if (result != net::ERR_IO_PENDING) { 140 if (result != net::ERR_IO_PENDING) {
140 VLOG(1) << "Network proxy resolution completed synchronously."; 141 VLOG(1) << "Network proxy resolution completed synchronously.";
141 request->OnCompletion(result); 142 request->OnCompletion(result);
142 } 143 }
143 } 144 }
144 145
145 // Called on UI thread as task posted from Request::OnCompletion on IO 146 // Called on UI thread as task posted from Request::OnCompletion on IO
146 // thread. 147 // thread.
147 void NotifyProxyResolved( 148 void NotifyProxyResolved(
148 const std::string& signal_interface, 149 const std::string& signal_interface,
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 ProxyResolutionServiceProvider* 273 ProxyResolutionServiceProvider*
273 ProxyResolutionServiceProvider::CreateForTesting( 274 ProxyResolutionServiceProvider::CreateForTesting(
274 ProxyResolverInterface* resolver) { 275 ProxyResolverInterface* resolver) {
275 return new ProxyResolutionServiceProvider(resolver); 276 return new ProxyResolutionServiceProvider(resolver);
276 } 277 }
277 278
278 ProxyResolverInterface::~ProxyResolverInterface() { 279 ProxyResolverInterface::~ProxyResolverInterface() {
279 } 280 }
280 281
281 } // namespace chromeos 282 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/io_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698