OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/predictors/glowplug_predictor.h" | |
6 | |
7 #include "base/memory/ptr_util.h" | |
8 #include "chrome/browser/predictors/resource_prefetch_predictor.h" | |
9 | |
10 namespace predictors { | |
11 | |
12 GlowplugPredictor::GlowplugPredictor(const GlowplugPredictorConfig& config, | |
13 Profile* profile) { | |
14 resource_prefetch_predictor_ = base::WrapUnique<ResourcePrefetchPredictor>( | |
alexilin
2017/05/11 16:53:12
nit: why not MakeUnique?
Benoit L
2017/05/12 12:12:52
No good reason, used that to make ResourcePrefetch
| |
15 new ResourcePrefetchPredictor(config, profile)); | |
16 } | |
17 | |
18 GlowplugPredictor::~GlowplugPredictor() = default; | |
19 | |
20 void GlowplugPredictor::StartPrefetching(const GURL& main_frame_url, | |
21 PrefetchOrigin origin) { | |
22 resource_prefetch_predictor_->StartPrefetching(main_frame_url, origin); | |
23 } | |
24 | |
25 void GlowplugPredictor::StopPrefetching(const GURL& main_frame_url) { | |
26 resource_prefetch_predictor_->StopPrefetching(main_frame_url); | |
27 } | |
28 | |
29 ResourcePrefetchPredictor* GlowplugPredictor::resource_prefetch_predictor() | |
30 const { | |
31 return resource_prefetch_predictor_.get(); | |
32 } | |
33 | |
34 void GlowplugPredictor::Shutdown() { | |
35 resource_prefetch_predictor_->Shutdown(); | |
36 } | |
37 | |
38 } // namespace predictors | |
OLD | NEW |