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

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

Issue 2887133003: predictors: Refactor resource_prefetch_predictor triggering. (Closed)
Patch Set: . Created 3 years, 6 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 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 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCHER_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCHER_MANAGER_H_
6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCHER_MANAGER_H_ 6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCHER_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 // ResourcePrefetcher::Delegate methods. 57 // ResourcePrefetcher::Delegate methods.
58 void ResourcePrefetcherFinished( 58 void ResourcePrefetcherFinished(
59 ResourcePrefetcher* prefetcher, 59 ResourcePrefetcher* prefetcher,
60 std::unique_ptr<ResourcePrefetcher::PrefetcherStats> stats) override; 60 std::unique_ptr<ResourcePrefetcher::PrefetcherStats> stats) override;
61 net::URLRequestContext* GetURLRequestContext() override; 61 net::URLRequestContext* GetURLRequestContext() override;
62 62
63 private: 63 private:
64 friend class base::RefCountedThreadSafe<ResourcePrefetcherManager>; 64 friend class base::RefCountedThreadSafe<ResourcePrefetcherManager>;
65 friend class MockResourcePrefetcherManager; 65 friend class MockResourcePrefetcherManager;
66
67 ~ResourcePrefetcherManager() override; 66 ~ResourcePrefetcherManager() override;
68 67
69 ResourcePrefetchPredictor* predictor_; 68 ResourcePrefetchPredictor* predictor_;
70 const LoadingPredictorConfig config_; 69 const LoadingPredictorConfig config_;
71 net::URLRequestContextGetter* const context_getter_; 70 net::URLRequestContextGetter* const context_getter_;
72 71
73 std::map<std::string, std::unique_ptr<ResourcePrefetcher>> prefetcher_map_; 72 std::map<std::string, std::unique_ptr<ResourcePrefetcher>> prefetcher_map_;
74 73
75 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetcherManager); 74 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetcherManager);
76 }; 75 };
77 76
78 } // namespace predictors 77 } // namespace predictors
79 78
80 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCHER_MANAGER_H_ 79 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCHER_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/predictors/resource_prefetch_predictor_unittest.cc ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698