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

Side by Side Diff: content/browser/renderer_host/pepper/pepper_network_proxy_host.cc

Issue 1684123004: Bypass the DataReductionProxy for all POST requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing nit issues and Rebase Created 4 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/renderer_host/pepper/pepper_network_proxy_host.h" 5 #include "content/browser/renderer_host/pepper/pepper_network_proxy_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" 8 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
9 #include "content/browser/renderer_host/pepper/pepper_socket_utils.h" 9 #include "content/browser/renderer_host/pepper/pepper_socket_utils.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } else { 139 } else {
140 // Everything looks valid, so try to resolve the proxy. 140 // Everything looks valid, so try to resolve the proxy.
141 net::ProxyInfo* proxy_info = new net::ProxyInfo; 141 net::ProxyInfo* proxy_info = new net::ProxyInfo;
142 net::ProxyService::PacRequest* pending_request = NULL; 142 net::ProxyService::PacRequest* pending_request = NULL;
143 base::Callback<void(int)> callback = 143 base::Callback<void(int)> callback =
144 base::Bind(&PepperNetworkProxyHost::OnResolveProxyCompleted, 144 base::Bind(&PepperNetworkProxyHost::OnResolveProxyCompleted,
145 weak_factory_.GetWeakPtr(), 145 weak_factory_.GetWeakPtr(),
146 request.reply_context, 146 request.reply_context,
147 base::Owned(proxy_info)); 147 base::Owned(proxy_info));
148 int result = proxy_service_->ResolveProxy(request.url, 148 int result = proxy_service_->ResolveProxy(request.url,
149 std::string(),
149 net::LOAD_NORMAL, 150 net::LOAD_NORMAL,
150 proxy_info, 151 proxy_info,
151 callback, 152 callback,
152 &pending_request, 153 &pending_request,
153 NULL, 154 NULL,
154 net::BoundNetLog()); 155 net::BoundNetLog());
155 pending_requests_.push(pending_request); 156 pending_requests_.push(pending_request);
156 // If it was handled synchronously, we must run the callback now; 157 // If it was handled synchronously, we must run the callback now;
157 // proxy_service_ won't run it for us in this case. 158 // proxy_service_ won't run it for us in this case.
158 if (result != net::ERR_IO_PENDING) 159 if (result != net::ERR_IO_PENDING)
(...skipping 23 matching lines...) Expand all
182 183
183 void PepperNetworkProxyHost::SendFailureReply( 184 void PepperNetworkProxyHost::SendFailureReply(
184 int32_t error, 185 int32_t error,
185 ppapi::host::ReplyMessageContext context) { 186 ppapi::host::ReplyMessageContext context) {
186 context.params.set_result(error); 187 context.params.set_result(error);
187 host()->SendReply( 188 host()->SendReply(
188 context, PpapiPluginMsg_NetworkProxy_GetProxyForURLReply(std::string())); 189 context, PpapiPluginMsg_NetworkProxy_GetProxyForURLReply(std::string()));
189 } 190 }
190 191
191 } // namespace content 192 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698