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

Unified Diff: chrome/browser/chrome_content_browser_client.h

Issue 233353003: Only commit cookie changes in prerenders after a prerender is shown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync @269781 + 'autlock'->'autolock' from erik's comment that was not included before Created 6 years, 7 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/browser/chrome_content_browser_client.h
===================================================================
--- chrome/browser/chrome_content_browser_client.h (revision 269781)
+++ chrome/browser/chrome_content_browser_client.h (working copy)
@@ -31,6 +31,10 @@
class BrowserPermissionsPolicyDelegate;
}
+namespace prerender {
+class PrerenderTracker;
+}
+
namespace user_prefs {
class PrefRegistrySyncable;
}
@@ -102,6 +106,7 @@
const GURL& url) OVERRIDE;
virtual bool IsSuitableHost(content::RenderProcessHost* process_host,
const GURL& site_url) OVERRIDE;
+ virtual bool MayReuseHost(content::RenderProcessHost* process_host) OVERRIDE;
virtual bool ShouldTryToUseExistingProcessHost(
content::BrowserContext* browser_context, const GURL& url) OVERRIDE;
virtual void SiteInstanceGotProcess(
@@ -278,6 +283,9 @@
virtual bool IsPluginAllowedToUseDevChannelAPIs() OVERRIDE;
+ virtual net::CookieStore* OverrideCookieStoreForRenderProcess(
+ int render_process_id) OVERRIDE;
+
private:
#if defined(ENABLE_WEBRTC)
// Copies disable WebRTC encryption switch depending on the channel.
@@ -296,6 +304,14 @@
scoped_ptr<extensions::BrowserPermissionsPolicyDelegate>
permissions_policy_delegate_;
+ // The prerender tracker used to determine whether a render process is used
+ // for prerendering and an override cookie store must be provided.
+ // This needs to be kept as a member rather than just looked up from
+ // the profile due to initialization ordering, as well as due to threading.
+ // It is initialized on the UI thread when the ResoureDispatcherHost is
+ // created. It is used only the IO thread.
+ prerender::PrerenderTracker* prerender_tracker_;
+
friend class DisableWebRtcEncryptionFlagTest;
DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient);

Powered by Google App Engine
This is Rietveld 408576698