| 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 #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 Loading... |
| 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_ |
| OLD | NEW |