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

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

Issue 2894973002: Provide WebContents::CreateParams to tab helpers. (Closed)
Patch Set: rebase Created 3 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/prerender/prerender_contents.h ('k') | chrome/browser/ui/browser.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
diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc
index 224d790fc806161755db7002a5f4498d9a45f2fc..90242fb455883aba8fa3494a32cd288f9e61830c 100644
--- a/chrome/browser/prerender/prerender_contents.cc
+++ b/chrome/browser/prerender/prerender_contents.cc
@@ -287,8 +287,11 @@ void PrerenderContents::StartPrerendering(
prerendering_has_started_ = true;
- prerender_contents_.reset(CreateWebContents(session_storage_namespace));
- TabHelpers::AttachTabHelpers(prerender_contents_.get());
+ content::WebContents::CreateParams create_params =
+ WebContents::CreateParams(profile_);
+ prerender_contents_.reset(
+ CreateWebContents(create_params, session_storage_namespace));
+ TabHelpers::AttachTabHelpers(prerender_contents_.get(), create_params);
content::WebContentsObserver::Observe(prerender_contents_.get());
// Tag the prerender contents with the task manager specific prerender tag, so
@@ -447,13 +450,14 @@ void PrerenderContents::OnRenderViewHostCreated(
}
WebContents* PrerenderContents::CreateWebContents(
+ const content::WebContents::CreateParams& create_params,
SessionStorageNamespace* session_storage_namespace) {
// TODO(ajwong): Remove the temporary map once prerendering is aware of
// multiple session storage namespaces per tab.
content::SessionStorageNamespaceMap session_storage_namespace_map;
session_storage_namespace_map[std::string()] = session_storage_namespace;
- return WebContents::CreateWithSessionStorage(
- WebContents::CreateParams(profile_), session_storage_namespace_map);
+ return WebContents::CreateWithSessionStorage(create_params,
+ session_storage_namespace_map);
}
void PrerenderContents::NotifyPrerenderStart() {
« no previous file with comments | « chrome/browser/prerender/prerender_contents.h ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698