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

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: Add browser tests, fix a bug in what was changed yesterday. 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 265252)
+++ 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(
@@ -282,6 +287,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.
@@ -300,6 +308,13 @@
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
+ // (initialize on the UI thread, use on the IO thread).
Charlie Reis 2014/05/07 17:21:32 What makes this safe to use on a different thread
tburkard 2014/05/07 18:34:27 Corrected & clarified the comment.
+ prerender::PrerenderTracker* prerender_tracker_;
+
friend class DisableWebRtcEncryptionFlagTest;
DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient);

Powered by Google App Engine
This is Rietveld 408576698