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

Unified Diff: content/public/browser/content_browser_client.h

Issue 13877028: Renderer initiated navigations from non instant process should not fall into instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments & ensure InstantLoader pages start in the right SiteInstance. Created 7 years, 8 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: content/public/browser/content_browser_client.h
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 5047f6450cc854910e6fc52fe56e169e9e038b59..a787d5d1bde587efa6d1458e9690a4bd3bd074e6 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -142,6 +142,22 @@ class CONTENT_EXPORT ContentBrowserClient {
// Notifies that a BrowserChildProcessHost has been created.
virtual void BrowserChildProcessHostCreated(BrowserChildProcessHost* host) {}
+ // Determines whether a navigation from |current_instance| to |url| would be a
+ // valid entry point to a "privileged site," based on whether it
+ // |is_renderer_initiated|. A privileged site requires careful process
+ // isolation to ensure its privileges do not leak, and it can only be entered
+ // via known navigation paths.
+ //
+ // If this is a valid entry to a privileged site, this function should rewrite
+ // the origin of |url| with a non-http(s) origin that represents the
+ // privileged site. This will distinguish the resulting SiteInstance from
+ // other SiteInstances in the process model.
+ virtual GURL GetPossiblyPrivilegedURL(
+ content::BrowserContext* browser_context,
+ const GURL& url,
+ bool is_renderer_initiated,
+ SiteInstance* current_instance);
+
// Get the effective URL for the given actual URL, to allow an embedder to
// group different url schemes in the same SiteInstance.
virtual GURL GetEffectiveURL(BrowserContext* browser_context,

Powered by Google App Engine
This is Rietveld 408576698