Commit c36f566d authored by Alexandr Ilin's avatar Alexandr Ilin Committed by Commit Bot

predictors: Remove unused pointer from ResourcePrefetchPredictor

ResourcePrefetchPredictor doesn't use LoadingStatsCollector since the CL
https://crrev.com/2937623007 was landed.

Bug: 715525
Change-Id: Ic16227b20fe2f3dfbd2b28e662a28f9339cc816e
Reviewed-on: https://chromium-review.googlesource.com/574606Reviewed-by: default avatarEgor Pasko <pasko@chromium.org>
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487167}
parent 2e381b41
......@@ -30,7 +30,6 @@ LoadingPredictor::LoadingPredictor(const LoadingPredictorConfig& config,
config)),
observer_(nullptr),
weak_factory_(this) {
resource_prefetch_predictor_->SetStatsCollector(stats_collector_.get());
preconnect_manager_ = base::MakeUnique<PreconnectManager>(
GetWeakPtr(), profile_->GetRequestContext());
}
......
......@@ -16,7 +16,6 @@
#include "base/trace_event/trace_event.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/predictors/loading_data_collector.h"
#include "chrome/browser/predictors/loading_stats_collector.h"
#include "chrome/browser/predictors/predictor_database.h"
#include "chrome/browser/predictors/predictor_database_factory.h"
#include "chrome/browser/profiles/profile.h"
......@@ -193,7 +192,6 @@ ResourcePrefetchPredictor::ResourcePrefetchPredictor(
Profile* profile)
: profile_(profile),
observer_(nullptr),
stats_collector_(nullptr),
config_(config),
initialization_state_(NOT_INITIALIZED),
tables_(PredictorDatabaseFactory::GetForProfile(profile)
......@@ -260,11 +258,6 @@ void ResourcePrefetchPredictor::SetObserverForTesting(TestObserver* observer) {
observer_ = observer;
}
void ResourcePrefetchPredictor::SetStatsCollector(
LoadingStatsCollector* stats_collector) {
stats_collector_ = stats_collector;
}
void ResourcePrefetchPredictor::Shutdown() {
history_service_observer_.RemoveAll();
}
......
......@@ -59,7 +59,6 @@ struct LastVisitTimeCompare {
class TestObserver;
class ResourcePrefetcherManager;
class LoadingStatsCollector;
struct PreconnectPrediction {
PreconnectPrediction();
......@@ -150,9 +149,6 @@ class ResourcePrefetchPredictor : public history::HistoryServiceObserver {
// this with nullptr parameter to de-register observer.
void SetObserverForTesting(TestObserver* observer);
// Sets the |stats_collector| which is used to report histograms.
void SetStatsCollector(LoadingStatsCollector* stats_collector);
// Returns true iff there is PrefetchData that can be used for a
// |main_frame_url| and fills |prediction| with resources that need to be
// prefetched. |prediction| pointer may be nullptr to get return value only.
......@@ -293,7 +289,6 @@ class ResourcePrefetchPredictor : public history::HistoryServiceObserver {
Profile* const profile_;
TestObserver* observer_;
LoadingStatsCollector* stats_collector_;
const LoadingPredictorConfig config_;
InitializationState initialization_state_;
scoped_refptr<ResourcePrefetchPredictorTables> tables_;
......
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