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

Unified Diff: chrome/browser/autocomplete/autocomplete_edit.cc

Issue 8392041: Prerendered tabs use the same SessionStorage namespace as the tab that triggered the prerender. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove check Created 9 years, 1 month 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 | « no previous file | chrome/browser/prerender/prerender_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_edit.cc
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
index a7551aa24aa5ca1e8bbf10a5488f898e6d9ccc0a..b9f7000f55159bb0dc13d41a02de67ac4755967d 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc
@@ -38,6 +38,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/url_constants.h"
+#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/user_metrics.h"
#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
@@ -1037,8 +1038,11 @@ void AutocompleteEditModel::DoPrerender(const AutocompleteMatch& match) {
TabContentsWrapper* tab = controller_->GetTabContentsWrapper();
prerender::PrerenderManager* prerender_manager =
prerender::PrerenderManagerFactory::GetForProfile(tab->profile());
- if (prerender_manager)
- prerender_manager->AddPrerenderFromOmnibox(match.destination_url);
+ if (prerender_manager) {
+ RenderViewHost* current_host = tab->tab_contents()->render_view_host();
+ prerender_manager->AddPrerenderFromOmnibox(
+ match.destination_url, current_host->session_storage_namespace());
+ }
}
}
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698