#include "chrome/browser/sessions/tab_loader_delegate.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/resource_coordinator/session_restore_policy.h"
#include "chrome/browser/resource_coordinator/tab_manager_features.h"
#include "chrome/browser/sessions/session_restore_observer.h"
#include "components/variations/variations_associated_data.h"
#include "content/public/browser/network_service_instance.h"
#include "services/network/public/cpp/network_connection_tracker.h"
namespace {
static const int kInitialDelayTimerMS = …;
static const int kFirstTabLoadTimeoutMS = …;
resource_coordinator::SessionRestorePolicy* g_testing_policy = …;
class TabLoaderDelegateImpl
: public TabLoaderDelegate,
public network::NetworkConnectionTracker::NetworkConnectionObserver { … };
TabLoaderDelegateImpl::TabLoaderDelegateImpl(TabLoaderCallback* callback)
: … { … }
TabLoaderDelegateImpl::~TabLoaderDelegateImpl() { … }
void TabLoaderDelegateImpl::OnConnectionChanged(
network::mojom::ConnectionType type) { … }
void TabLoaderDelegateImpl::NotifyTabScoreChanged(content::WebContents* content,
float score) { … }
}
std::unique_ptr<TabLoaderDelegate> TabLoaderDelegate::Create(
TabLoaderCallback* callback) { … }
void TabLoaderDelegate::SetSessionRestorePolicyForTesting(
resource_coordinator::SessionRestorePolicy* policy) { … }