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

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

Issue 280383002: Revert 269855 "Only commit cookie changes in prerenders after a ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
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
Index: trunk/src/chrome/browser/prerender/prerender_contents.cc
===================================================================
--- trunk/src/chrome/browser/prerender/prerender_contents.cc (revision 269877)
+++ trunk/src/chrome/browser/prerender/prerender_contents.cc (working copy)
@@ -39,10 +39,8 @@
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/common/frame_navigate_params.h"
#include "content/public/common/page_transition_types.h"
-#include "net/url_request/url_request_context_getter.h"
#include "ui/gfx/rect.h"
-using content::BrowserThread;
using content::DownloadItem;
using content::OpenURLParams;
using content::RenderViewHost;
@@ -293,8 +291,7 @@
void PrerenderContents::StartPrerendering(
int creator_child_id,
const gfx::Size& size,
- SessionStorageNamespace* session_storage_namespace,
- net::URLRequestContextGetter* request_context) {
+ SessionStorageNamespace* session_storage_namespace) {
DCHECK(profile_ != NULL);
DCHECK(!size.IsEmpty());
DCHECK(!prerendering_has_started_);
@@ -342,24 +339,6 @@
// the event of a mismatch.
alias_session_storage_namespace->AddTransactionLogProcessId(child_id_);
- // Add the RenderProcessHost to the Prerender Manager.
- prerender_manager()->AddPrerenderProcessHost(
- GetRenderViewHost()->GetProcess());
-
- // In the prerender tracker, create a Prerender Cookie Store to keep track of
- // 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)));
-
NotifyPrerenderStart();
// Close ourselves when the application is shutting down.
@@ -817,8 +796,8 @@
NotifyPrerenderStop();
- BrowserThread::PostTask(
- BrowserThread::IO,
+ content::BrowserThread::PostTask(
+ content::BrowserThread::IO,
FROM_HERE,
base::Bind(&ResumeThrottles, resource_throttles_));
resource_throttles_.clear();
« no previous file with comments | « trunk/src/chrome/browser/prerender/prerender_contents.h ('k') | trunk/src/chrome/browser/prerender/prerender_cookie_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698