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

Side by Side Diff: content/renderer/npapi/webplugin_impl.cc

Issue 132233022: Fix chrome.webRequest.onBeforeRequest for requests coming from NPAPI plugin processes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/npapi/webplugin_delegate_proxy.cc ('k') | no next file » | 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 "content/renderer/npapi/webplugin_impl.h" 5 #include "content/renderer/npapi/webplugin_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/crash_logging.h" 9 #include "base/debug/crash_logging.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 // WebFrameImpl::setReferrerForRequest does. 1196 // WebFrameImpl::setReferrerForRequest does.
1197 WebURLRequest request(complete_url); 1197 WebURLRequest request(complete_url);
1198 SetReferrer(&request, referrer_flag); 1198 SetReferrer(&request, referrer_flag);
1199 GURL referrer( 1199 GURL referrer(
1200 request.httpHeaderField(WebString::fromUTF8("Referer")).utf8()); 1200 request.httpHeaderField(WebString::fromUTF8("Referer")).utf8());
1201 1201
1202 GURL first_party_for_cookies = webframe_->document().firstPartyForCookies(); 1202 GURL first_party_for_cookies = webframe_->document().firstPartyForCookies();
1203 delegate_->FetchURL(resource_id, notify_id, complete_url, 1203 delegate_->FetchURL(resource_id, notify_id, complete_url,
1204 first_party_for_cookies, method, buf, len, referrer, 1204 first_party_for_cookies, method, buf, len, referrer,
1205 notify_redirects, is_plugin_src_load, 0, 1205 notify_redirects, is_plugin_src_load, 0,
1206 render_frame_->GetRoutingID()); 1206 render_frame_->GetRoutingID(),
1207 render_view_->GetRoutingID());
1207 } else { 1208 } else {
1208 WebPluginResourceClient* resource_client = delegate_->CreateResourceClient( 1209 WebPluginResourceClient* resource_client = delegate_->CreateResourceClient(
1209 resource_id, complete_url, notify_id); 1210 resource_id, complete_url, notify_id);
1210 if (!resource_client) 1211 if (!resource_client)
1211 return; 1212 return;
1212 InitiateHTTPRequest(resource_id, resource_client, complete_url, method, buf, 1213 InitiateHTTPRequest(resource_id, resource_client, complete_url, method, buf,
1213 len, NULL, referrer_flag, notify_redirects, 1214 len, NULL, referrer_flag, notify_redirects,
1214 is_plugin_src_load); 1215 is_plugin_src_load);
1215 } 1216 }
1216 } 1217 }
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 case PLUGIN_SRC: 1487 case PLUGIN_SRC:
1487 webframe_->setReferrerForRequest(*request, plugin_url_); 1488 webframe_->setReferrerForRequest(*request, plugin_url_);
1488 break; 1489 break;
1489 1490
1490 default: 1491 default:
1491 break; 1492 break;
1492 } 1493 }
1493 } 1494 }
1494 1495
1495 } // namespace content 1496 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/npapi/webplugin_delegate_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698