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

Side by Side Diff: chrome/browser/predictors/loading_predictor.h

Issue 2879103003: android: move ResourcePrefetchPredictor usage to LoadingPredictor. (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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_PREDICTORS_LOADING_PREDICTOR_H_ 5 #ifndef CHROME_BROWSER_PREDICTORS_LOADING_PREDICTOR_H_
6 #define CHROME_BROWSER_PREDICTORS_LOADING_PREDICTOR_H_ 6 #define CHROME_BROWSER_PREDICTORS_LOADING_PREDICTOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 21 matching lines...) Expand all
32 LoadingPredictor(const LoadingPredictorConfig& config, Profile* profile); 32 LoadingPredictor(const LoadingPredictorConfig& config, Profile* profile);
33 ~LoadingPredictor() override; 33 ~LoadingPredictor() override;
34 34
35 // Hints that a page load is expected for |url|, with the hint coming from a 35 // Hints that a page load is expected for |url|, with the hint coming from a
36 // given |origin|. May trigger actions, such as prefetch and/or preconnect. 36 // given |origin|. May trigger actions, such as prefetch and/or preconnect.
37 void PrepareForPageLoad(const GURL& url, HintOrigin origin); 37 void PrepareForPageLoad(const GURL& url, HintOrigin origin);
38 38
39 // Indicates that a page load hint is no longer active. 39 // Indicates that a page load hint is no longer active.
40 void CancelPageLoadHint(const GURL& url); 40 void CancelPageLoadHint(const GURL& url);
41 41
42 // Starts initialization, will complete asynchronously.
43 void StartInitialization();
44
42 // Don't use, internal only. 45 // Don't use, internal only.
43 ResourcePrefetchPredictor* resource_prefetch_predictor() const; 46 ResourcePrefetchPredictor* resource_prefetch_predictor() const;
44 47
45 // KeyedService: 48 // KeyedService:
46 void Shutdown() override; 49 void Shutdown() override;
47 50
48 private: 51 private:
49 std::unique_ptr<ResourcePrefetchPredictor> resource_prefetch_predictor_; 52 std::unique_ptr<ResourcePrefetchPredictor> resource_prefetch_predictor_;
50 53
51 DISALLOW_COPY_AND_ASSIGN(LoadingPredictor); 54 DISALLOW_COPY_AND_ASSIGN(LoadingPredictor);
52 }; 55 };
53 56
54 } // namespace predictors 57 } // namespace predictors
55 58
56 #endif // CHROME_BROWSER_PREDICTORS_LOADING_PREDICTOR_H_ 59 #endif // CHROME_BROWSER_PREDICTORS_LOADING_PREDICTOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/chrome_jni_registrar.cc ('k') | chrome/browser/predictors/loading_predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698