Commit 6aa04d5c authored by Mugdha Lakhani's avatar Mugdha Lakhani Committed by Commit Bot

[Prerender] Remove unused methods.

Deletes three methods that aren't used anymore.

Bug: 1106294
Change-Id: Id330a6b8b56d339f3a596fcdefea9d5c21b32f2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2478947Reviewed-by: default avatarRyan Sturm <ryansturm@chromium.org>
Commit-Queue: Mugdha Lakhani <nator@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819373}
parent 3807181f
...@@ -286,36 +286,6 @@ bool PrerenderManager::IsWebContentsPrerendering( ...@@ -286,36 +286,6 @@ bool PrerenderManager::IsWebContentsPrerendering(
return GetPrerenderContents(web_contents); return GetPrerenderContents(web_contents);
} }
bool PrerenderManager::HasPrerenderedUrl(
GURL url,
content::WebContents* web_contents) const {
content::SessionStorageNamespace* session_storage_namespace =
web_contents->GetController().GetDefaultSessionStorageNamespace();
for (const auto& prerender_data : active_prerenders_) {
PrerenderContents* prerender_contents = prerender_data->contents();
if (prerender_contents->Matches(url, session_storage_namespace))
return true;
}
return false;
}
bool PrerenderManager::HasPrerenderedAndFinishedLoadingUrl(
GURL url,
content::WebContents* web_contents) const {
content::SessionStorageNamespace* session_storage_namespace =
web_contents->GetController().GetDefaultSessionStorageNamespace();
for (const auto& prerender_data : active_prerenders_) {
PrerenderContents* prerender_contents = prerender_data->contents();
if (prerender_contents->Matches(url, session_storage_namespace) &&
prerender_contents->has_finished_loading()) {
return true;
}
}
return false;
}
PrerenderContents* PrerenderManager::GetPrerenderContents( PrerenderContents* PrerenderManager::GetPrerenderContents(
const content::WebContents* web_contents) const { const content::WebContents* web_contents) const {
DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_CURRENTLY_ON(BrowserThread::UI);
...@@ -348,19 +318,6 @@ PrerenderContents* PrerenderManager::GetPrerenderContentsForRoute( ...@@ -348,19 +318,6 @@ PrerenderContents* PrerenderManager::GetPrerenderContentsForRoute(
return web_contents ? GetPrerenderContents(web_contents) : nullptr; return web_contents ? GetPrerenderContents(web_contents) : nullptr;
} }
PrerenderContents* PrerenderManager::GetPrerenderContentsForProcess(
int render_process_id) const {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
for (auto& prerender_data : active_prerenders_) {
PrerenderContents* prerender_contents = prerender_data->contents();
if (prerender_contents->GetRenderViewHost()->GetProcess()->GetID() ==
render_process_id) {
return prerender_contents;
}
}
return nullptr;
}
std::vector<WebContents*> std::vector<WebContents*>
PrerenderManager::GetAllNoStatePrefetchingContentsForTesting() const { PrerenderManager::GetAllNoStatePrefetchingContentsForTesting() const {
DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_CURRENTLY_ON(BrowserThread::UI);
......
...@@ -177,17 +177,6 @@ class PrerenderManager : public content::RenderProcessHostObserver, ...@@ -177,17 +177,6 @@ class PrerenderManager : public content::RenderProcessHostObserver,
bool IsWebContentsPrerendering( bool IsWebContentsPrerendering(
const content::WebContents* web_contents) const; const content::WebContents* web_contents) const;
// Whether the PrerenderManager has an active prerender with the given url and
// SessionStorageNamespace associated with the given WebContents.
bool HasPrerenderedUrl(GURL url, content::WebContents* web_contents) const;
// Whether the PrerenderManager has an active prerender with the given url and
// SessionStorageNamespace associated with the given WebContents, and that
// prerender has finished loading..
bool HasPrerenderedAndFinishedLoadingUrl(
GURL url,
content::WebContents* web_contents) const;
// Returns the PrerenderContents object for the given web_contents, otherwise // Returns the PrerenderContents object for the given web_contents, otherwise
// returns NULL. Note that the PrerenderContents may have been Destroy()ed, // returns NULL. Note that the PrerenderContents may have been Destroy()ed,
// but not yet deleted. // but not yet deleted.
...@@ -200,11 +189,6 @@ class PrerenderManager : public content::RenderProcessHostObserver, ...@@ -200,11 +189,6 @@ class PrerenderManager : public content::RenderProcessHostObserver,
virtual PrerenderContents* GetPrerenderContentsForRoute(int child_id, virtual PrerenderContents* GetPrerenderContentsForRoute(int child_id,
int route_id) const; int route_id) const;
// Returns the PrerenderContents object that is found in active prerenders to
// match the |render_process_id|. Otherwise returns a nullptr.
PrerenderContents* GetPrerenderContentsForProcess(
int render_process_id) const;
// Returns a list of all WebContents being prerendered. // Returns a list of all WebContents being prerendered.
std::vector<content::WebContents*> GetAllPrerenderingContents() const; std::vector<content::WebContents*> GetAllPrerenderingContents() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment