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

Side by Side Diff: content/browser/resolve_proxy_msg_helper.cc

Issue 332313003: Add Finch experiment for selectively bypassing proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: callback design (not yet done) 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
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 "content/browser/resolve_proxy_msg_helper.h" 5 #include "content/browser/resolve_proxy_msg_helper.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/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // Verify the request wasn't started yet. 84 // Verify the request wasn't started yet.
85 DCHECK(NULL == req.pac_req); 85 DCHECK(NULL == req.pac_req);
86 86
87 if (context_getter_.get()) { 87 if (context_getter_.get()) {
88 proxy_service_ = context_getter_->GetURLRequestContext()->proxy_service(); 88 proxy_service_ = context_getter_->GetURLRequestContext()->proxy_service();
89 context_getter_ = NULL; 89 context_getter_ = NULL;
90 } 90 }
91 91
92 // Start the request. 92 // Start the request.
93 int result = proxy_service_->ResolveProxy( 93 int result = proxy_service_->ResolveProxy(
94 req.url, &proxy_info_, 94 req.url, 0, &proxy_info_,
95 base::Bind(&ResolveProxyMsgHelper::OnResolveProxyCompleted, 95 base::Bind(&ResolveProxyMsgHelper::OnResolveProxyCompleted,
96 base::Unretained(this)), 96 base::Unretained(this)),
97 &req.pac_req, net::BoundNetLog()); 97 &req.pac_req, net::BoundNetLog());
98 98
99 // Completed synchronously. 99 // Completed synchronously.
100 if (result != net::ERR_IO_PENDING) 100 if (result != net::ERR_IO_PENDING)
101 OnResolveProxyCompleted(result); 101 OnResolveProxyCompleted(result);
102 } 102 }
103 103
104 } // namespace content 104 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698