#include "content/browser/preloading/prerender/prerender_no_vary_search_hint_commit_deferring_condition.h"
#include <memory>
#include <optional>
#include "base/check.h"
#include "base/feature_list.h"
#include "base/functional/callback_forward.h"
#include "base/memory/ptr_util.h"
#include "base/no_destructor.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.h"
#include "content/browser/preloading/prerender/prerender_host.h"
#include "content/browser/renderer_host/frame_tree_node.h"
#include "content/browser/renderer_host/navigation_request.h"
#include "content/public/browser/commit_deferring_condition.h"
namespace content {
namespace {
FrameTreeNode* GetRootPrerenderFrameTreeNode(int prerender_frame_tree_node_id) { … }
}
std::unique_ptr<CommitDeferringCondition>
PrerenderNoVarySearchHintCommitDeferringCondition::MaybeCreate(
NavigationRequest& navigation_request,
NavigationType navigation_type,
std::optional<int> candidate_prerender_frame_tree_node_id) { … }
PrerenderNoVarySearchHintCommitDeferringCondition::
~PrerenderNoVarySearchHintCommitDeferringCondition() { … }
PrerenderNoVarySearchHintCommitDeferringCondition::
PrerenderNoVarySearchHintCommitDeferringCondition(
NavigationRequest& navigation_request,
int candidate_prerender_frame_tree_node_id)
: … { … }
CommitDeferringCondition::Result
PrerenderNoVarySearchHintCommitDeferringCondition::WillCommitNavigation(
base::OnceClosure resume) { … }
void PrerenderNoVarySearchHintCommitDeferringCondition::OnHeadersReceived() { … }
void PrerenderNoVarySearchHintCommitDeferringCondition::OnHostDestroyed(
PrerenderFinalStatus status) { … }
void PrerenderNoVarySearchHintCommitDeferringCondition::
OnBlockUntilHeadTimerElapsed() { … }
scoped_refptr<base::SingleThreadTaskRunner>
PrerenderNoVarySearchHintCommitDeferringCondition::GetTimerTaskRunner() { … }
scoped_refptr<base::SingleThreadTaskRunner>&
PrerenderNoVarySearchHintCommitDeferringCondition::
GetTimerTaskRunnerForTesting() { … }
void PrerenderNoVarySearchHintCommitDeferringCondition::
SetTimerTaskRunnerForTesting(
scoped_refptr<base::SingleThreadTaskRunner> task_runner) { … }
}