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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 8769026: Content-initiated navigations from chrome:// pages to chrome:// pages in a new tab must be browse... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_content_renderer_client.cc
===================================================================
--- chrome/renderer/chrome_content_renderer_client.cc (revision 112673)
+++ chrome/renderer/chrome_content_renderer_client.cc (working copy)
@@ -573,26 +573,32 @@
// TODO(erikkay) This is happening inside of a check to is_content_initiated
// which means that things like the back button won't trigger it. Is that
// OK?
- if (!CrossesExtensionExtents(frame, url, is_initial_navigation))
- return false;
+ if (CrossesExtensionExtents(frame, url, is_initial_navigation)) {
+ // Include the referrer in this case since we're going from a hosted web
+ // page. (the packaged case is handled previously by the extension
+ // navigation test)
+ *send_referrer = true;
- // Include the referrer in this case since we're going from a hosted web
- // page. (the packaged case is handled previously by the extension
- // navigation test)
- *send_referrer = true;
-
- if (is_content_initiated) {
- const Extension* extension =
- extension_dispatcher_->extensions()->GetByURL(ExtensionURLInfo(url));
- if (extension && extension->is_app()) {
- UMA_HISTOGRAM_ENUMERATION(
- extension_misc::kAppLaunchHistogram,
- extension_misc::APP_LAUNCH_CONTENT_NAVIGATION,
- extension_misc::APP_LAUNCH_BUCKET_BOUNDARY);
+ if (is_content_initiated) {
+ const Extension* extension =
+ extension_dispatcher_->extensions()->GetByURL(ExtensionURLInfo(url));
+ if (extension && extension->is_app()) {
+ UMA_HISTOGRAM_ENUMERATION(
+ extension_misc::kAppLaunchHistogram,
+ extension_misc::APP_LAUNCH_CONTENT_NAVIGATION,
+ extension_misc::APP_LAUNCH_BUCKET_BOUNDARY);
+ }
}
+ return true;
}
- return true;
+ // Navigating to a new chrome:// scheme (in a new tab) from within a
+ // chrome:// page must be a browser navigation so that the browser can
+ // register the new associated data source.
+ if (is_content_initiated && url.SchemeIs(kChromeUIScheme))
+ return true;
+
+ return false;
}
bool ChromeContentRendererClient::WillSendRequest(WebKit::WebFrame* frame,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698