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_PREFETCH_PREDICTOR_H_ | 5 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ |
6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ | 6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 ResourcePrefetcher::RequestVector* requests); | 173 ResourcePrefetcher::RequestVector* requests); |
174 ~Result(); | 174 ~Result(); |
175 | 175 |
176 PrefetchKeyType key_type; | 176 PrefetchKeyType key_type; |
177 std::unique_ptr<ResourcePrefetcher::RequestVector> requests; | 177 std::unique_ptr<ResourcePrefetcher::RequestVector> requests; |
178 | 178 |
179 private: | 179 private: |
180 DISALLOW_COPY_AND_ASSIGN(Result); | 180 DISALLOW_COPY_AND_ASSIGN(Result); |
181 }; | 181 }; |
182 | 182 |
183 typedef ResourcePrefetchPredictorTables::ResourceRow ResourceRow; | |
184 typedef ResourcePrefetchPredictorTables::ResourceRows ResourceRows; | |
185 typedef ResourcePrefetchPredictorTables::PrefetchData PrefetchData; | 183 typedef ResourcePrefetchPredictorTables::PrefetchData PrefetchData; |
186 typedef ResourcePrefetchPredictorTables::PrefetchDataMap PrefetchDataMap; | 184 typedef ResourcePrefetchPredictorTables::PrefetchDataMap PrefetchDataMap; |
187 typedef std::map<NavigationID, linked_ptr<std::vector<URLRequestSummary> > > | 185 typedef std::map<NavigationID, linked_ptr<std::vector<URLRequestSummary> > > |
188 NavigationMap; | 186 NavigationMap; |
189 typedef std::map<NavigationID, std::unique_ptr<Result>> ResultsMap; | 187 typedef std::map<NavigationID, std::unique_ptr<Result>> ResultsMap; |
190 | 188 |
191 // Returns true if the main page request is supported for prediction. | 189 // Returns true if the main page request is supported for prediction. |
192 static bool IsHandledMainPage(net::URLRequest* request); | 190 static bool IsHandledMainPage(net::URLRequest* request); |
193 | 191 |
194 // Returns true if the subresource request is supported for prediction. | 192 // Returns true if the subresource request is supported for prediction. |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 | 343 |
346 ScopedObserver<history::HistoryService, history::HistoryServiceObserver> | 344 ScopedObserver<history::HistoryService, history::HistoryServiceObserver> |
347 history_service_observer_; | 345 history_service_observer_; |
348 | 346 |
349 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictor); | 347 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictor); |
350 }; | 348 }; |
351 | 349 |
352 } // namespace predictors | 350 } // namespace predictors |
353 | 351 |
354 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ | 352 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ |
OLD | NEW |