OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/predictors/resource_prefetch_predictor.h" | 5 #include "chrome/browser/predictors/resource_prefetch_predictor.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 | 539 |
540 ResourcePrefetchPredictor::Prediction::Prediction( | 540 ResourcePrefetchPredictor::Prediction::Prediction( |
541 const ResourcePrefetchPredictor::Prediction& other) = default; | 541 const ResourcePrefetchPredictor::Prediction& other) = default; |
542 | 542 |
543 ResourcePrefetchPredictor::Prediction::~Prediction() = default; | 543 ResourcePrefetchPredictor::Prediction::~Prediction() = default; |
544 | 544 |
545 //////////////////////////////////////////////////////////////////////////////// | 545 //////////////////////////////////////////////////////////////////////////////// |
546 // ResourcePrefetchPredictor. | 546 // ResourcePrefetchPredictor. |
547 | 547 |
548 ResourcePrefetchPredictor::ResourcePrefetchPredictor( | 548 ResourcePrefetchPredictor::ResourcePrefetchPredictor( |
549 const ResourcePrefetchPredictorConfig& config, | 549 const GlowplugPredictorConfig& config, |
550 Profile* profile) | 550 Profile* profile) |
551 : profile_(profile), | 551 : profile_(profile), |
552 observer_(nullptr), | 552 observer_(nullptr), |
553 config_(config), | 553 config_(config), |
554 initialization_state_(NOT_INITIALIZED), | 554 initialization_state_(NOT_INITIALIZED), |
555 tables_(PredictorDatabaseFactory::GetForProfile(profile) | 555 tables_(PredictorDatabaseFactory::GetForProfile(profile) |
556 ->resource_prefetch_tables()), | 556 ->resource_prefetch_tables()), |
557 history_service_observer_(this) { | 557 history_service_observer_(this) { |
558 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 558 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
559 | 559 |
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1851 TestObserver::~TestObserver() { | 1851 TestObserver::~TestObserver() { |
1852 predictor_->SetObserverForTesting(nullptr); | 1852 predictor_->SetObserverForTesting(nullptr); |
1853 } | 1853 } |
1854 | 1854 |
1855 TestObserver::TestObserver(ResourcePrefetchPredictor* predictor) | 1855 TestObserver::TestObserver(ResourcePrefetchPredictor* predictor) |
1856 : predictor_(predictor) { | 1856 : predictor_(predictor) { |
1857 predictor_->SetObserverForTesting(this); | 1857 predictor_->SetObserverForTesting(this); |
1858 } | 1858 } |
1859 | 1859 |
1860 } // namespace predictors | 1860 } // namespace predictors |
OLD | NEW |