chromium/chrome/browser/navigation_predictor/navigation_predictor_preconnect_client.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/navigation_predictor/navigation_predictor_preconnect_client.h"

#include <memory>

#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/metrics/field_trial_params.h"
#include "base/metrics/histogram_macros.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/browser/navigation_predictor/navigation_predictor_features.h"
#include "chrome/browser/navigation_predictor/navigation_predictor_keyed_service.h"
#include "chrome/browser/navigation_predictor/navigation_predictor_keyed_service_factory.h"
#include "chrome/browser/navigation_predictor/search_engine_preconnector.h"
#include "chrome/browser/predictors/loading_predictor.h"
#include "chrome/browser/predictors/loading_predictor_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "components/search_engines/template_url_service.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "net/base/features.h"
#include "net/base/ip_address.h"

namespace {

// Experiment with which event triggers the preconnect after commit.
BASE_FEATURE();

}  // namespace

NavigationPredictorPreconnectClient::NavigationPredictorPreconnectClient(
    content::WebContents* web_contents)
    :{}

NavigationPredictorPreconnectClient::~NavigationPredictorPreconnectClient() {}

NavigationPredictorKeyedService*
NavigationPredictorPreconnectClient::GetNavigationPredictorKeyedService()
    const {}

void NavigationPredictorPreconnectClient::DidFinishNavigation(
    content::NavigationHandle* navigation_handle) {}

void NavigationPredictorPreconnectClient::OnVisibilityChanged(
    content::Visibility visibility) {}

void NavigationPredictorPreconnectClient::DidFinishLoad(
    content::RenderFrameHost* render_frame_host,
    const GURL& validated_url) {}

void NavigationPredictorPreconnectClient::MaybePreconnectNow(
    size_t preconnects_attempted) {}

bool NavigationPredictorPreconnectClient::IsSearchEnginePage() const {}

std::optional<bool> NavigationPredictorPreconnectClient::IsPubliclyRoutable(
    content::NavigationHandle* navigation_handle) const {}

bool NavigationPredictorPreconnectClient::
    enable_preconnects_for_local_ips_for_testing_ =;

WEB_CONTENTS_USER_DATA_KEY_IMPL(NavigationPredictorPreconnectClient);