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

Unified Diff: chrome/browser/prerender/prerender_contents.cc

Issue 293123010: Add a field trial to disable deferred committing of cookie changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/prerender/prerender_field_trial.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_contents.cc
===================================================================
--- chrome/browser/prerender/prerender_contents.cc (revision 272804)
+++ chrome/browser/prerender/prerender_contents.cc (working copy)
@@ -350,15 +350,19 @@
// cookie changes performed by the prerender. Once the prerender is shown,
// the cookie changes will be committed to the actual cookie store,
// otherwise, they will be discarded.
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- base::Bind(&PrerenderTracker::AddPrerenderCookieStoreOnIOThread,
- base::Unretained(prerender_manager()->prerender_tracker()),
- GetRenderViewHost()->GetProcess()->GetID(),
- make_scoped_refptr(request_context),
- base::Bind(&PrerenderContents::Destroy,
- AsWeakPtr(),
- FINAL_STATUS_COOKIE_CONFLICT)));
+ // If |request_context| is NULL, the feature must be disabled, so the
+ // operation will not be performed.
+ if (request_context) {
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ base::Bind(&PrerenderTracker::AddPrerenderCookieStoreOnIOThread,
+ base::Unretained(prerender_manager()->prerender_tracker()),
+ GetRenderViewHost()->GetProcess()->GetID(),
+ make_scoped_refptr(request_context),
+ base::Bind(&PrerenderContents::Destroy,
+ AsWeakPtr(),
+ FINAL_STATUS_COOKIE_CONFLICT)));
+ }
NotifyPrerenderStart();
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/prerender/prerender_field_trial.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698