Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1064)

Unified Diff: chrome/browser/predictors/loading_predictor.cc

Issue 2896713003: Create LoadingDataCollector class and have observers rely on it instead of ResourcePrefetchPredictor (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/predictors/loading_predictor.cc
diff --git a/chrome/browser/predictors/loading_predictor.cc b/chrome/browser/predictors/loading_predictor.cc
index d5bd264009427aead4df1a4926e85807fee38f60..6106c811b80ce49f944ac685f2309d62a77bd1d4 100644
--- a/chrome/browser/predictors/loading_predictor.cc
+++ b/chrome/browser/predictors/loading_predictor.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/predictors/loading_predictor.h"
#include "base/memory/ptr_util.h"
+#include "chrome/browser/predictors/glowplug_collector.h"
#include "chrome/browser/predictors/resource_prefetch_predictor.h"
namespace predictors {
@@ -13,6 +14,8 @@ LoadingPredictor::LoadingPredictor(const LoadingPredictorConfig& config,
Profile* profile) {
resource_prefetch_predictor_ =
base::MakeUnique<ResourcePrefetchPredictor>(config, profile);
+ glowplug_collector_ =
+ base::MakeUnique<GlowplugCollector>(resource_prefetch_predictor());
}
LoadingPredictor::~LoadingPredictor() = default;
@@ -29,6 +32,10 @@ void LoadingPredictor::StartInitialization() {
resource_prefetch_predictor_->StartInitialization();
}
+GlowplugCollector* LoadingPredictor::glowplug_collector() const {
+ return glowplug_collector_.get();
+}
+
ResourcePrefetchPredictor* LoadingPredictor::resource_prefetch_predictor()
const {
return resource_prefetch_predictor_.get();

Powered by Google App Engine
This is Rietveld 408576698