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

Unified Diff: chrome/browser/prerender/prerender_manager.h

Issue 49003011: Handle should_replace_current_entry in prerender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content::kAboutBlankURL Created 7 years 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_browsertest.cc ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_manager.h
diff --git a/chrome/browser/prerender/prerender_manager.h b/chrome/browser/prerender/prerender_manager.h
index b7f338b9c235a638dfb454a26c4fea8bc86490af..619e63fdb7a71f97f7950ecf04468b153c440464 100644
--- a/chrome/browser/prerender/prerender_manager.h
+++ b/chrome/browser/prerender/prerender_manager.h
@@ -431,7 +431,8 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>,
PendingSwap(PrerenderManager* manager,
content::WebContents* target_contents,
PrerenderData* prerender_data,
- const GURL& url);
+ const GURL& url,
+ bool should_replace_current_entry);
virtual ~PendingSwap();
void set_swap_successful(bool swap_successful) {
@@ -470,10 +471,13 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>,
void OnMergeCompleted(content::SessionStorageNamespace::MergeResult result);
void OnMergeTimeout();
+ // Prerender parameters.
PrerenderManager* manager_;
content::WebContents* target_contents_;
PrerenderData* prerender_data_;
GURL url_;
+ bool should_replace_current_entry_;
+
base::TimeTicks start_time_;
std::vector<PrerenderTracker::ChildRouteIdPair> rvh_ids_;
base::OneShotTimer<PendingSwap> merge_timeout_;
@@ -660,10 +664,12 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>,
// Swaps a prerender |prerender_data| for |url| into the tab, replacing
// |web_contents|. Returns the new WebContents that was swapped in, or NULL
- // if a swap-in was not possible.
+ // if a swap-in was not possible. If |should_replace_current_entry| is true,
+ // the current history entry in |web_contents| is replaced.
content::WebContents* SwapInternal(const GURL& url,
content::WebContents* web_contents,
- PrerenderData* prerender_data);
+ PrerenderData* prerender_data,
+ bool should_replace_current_entry);
// The configuration.
Config config_;
« no previous file with comments | « chrome/browser/prerender/prerender_browsertest.cc ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698