Commit 7a6ac5e3 authored by tsepez@chromium.org's avatar tsepez@chromium.org

Content-initiated navigations from chrome:// pages to chrome:// pages in a new...

Content-initiated navigations from chrome:// pages to chrome:// pages in a new tab must be browser navigations.

BUG=106132
TEST=Chrome os chrome://settings/about page "open source" links work.
Review URL: http://codereview.chromium.org/8769026

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113005 0039d316-1c4b-4281-b951-d872f2087c98
parent 54d52de2
......@@ -573,26 +573,32 @@ bool ChromeContentRendererClient::ShouldFork(WebFrame* frame,
// 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;
// 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 (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;
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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment