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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 10827107: Allow transitions to WebUI pages which are extension urls (new tab page is the relevant example). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/chrome_content_renderer_client.cc
===================================================================
--- chrome/renderer/chrome_content_renderer_client.cc (revision 150475)
+++ chrome/renderer/chrome_content_renderer_client.cc (working copy)
@@ -5,6 +5,7 @@
#include "chrome/renderer/chrome_content_renderer_client.h"
#include <string>
+#include <vector>
#include "base/command_line.h"
#include "base/logging.h"
@@ -776,14 +777,16 @@
}
bool ChromeContentRendererClient::WillSendRequest(WebKit::WebFrame* frame,
- const GURL& url,
- GURL* new_url) {
+ content::PageTransition transition_type,
+ const GURL& url,
+ GURL* new_url) {
// Check whether the request should be allowed. If not allowed, we reset the
// URL to something invalid to prevent the request and cause an error.
if (url.SchemeIs(chrome::kExtensionScheme) &&
!extensions::ResourceRequestPolicy::CanRequestResource(
url,
frame,
+ transition_type,
extension_dispatcher_->extensions())) {
*new_url = GURL("chrome-extension://invalid/");
return true;
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.h ('k') | chrome/renderer/extensions/resource_request_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698