| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 OnSubresourceResponse); | 152 OnSubresourceResponse); |
| 153 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, GetCorrectPLT); | 153 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, GetCorrectPLT); |
| 154 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, HandledResourceTypes); | 154 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, HandledResourceTypes); |
| 155 | 155 |
| 156 enum InitializationState { | 156 enum InitializationState { |
| 157 NOT_INITIALIZED = 0, | 157 NOT_INITIALIZED = 0, |
| 158 INITIALIZING = 1, | 158 INITIALIZING = 1, |
| 159 INITIALIZED = 2 | 159 INITIALIZED = 2 |
| 160 }; | 160 }; |
| 161 | 161 |
| 162 typedef ResourcePrefetchPredictorTables::ResourceRow ResourceRow; | |
| 163 typedef ResourcePrefetchPredictorTables::ResourceRows ResourceRows; | |
| 164 typedef ResourcePrefetchPredictorTables::PrefetchData PrefetchData; | 162 typedef ResourcePrefetchPredictorTables::PrefetchData PrefetchData; |
| 165 typedef ResourcePrefetchPredictorTables::PrefetchDataMap PrefetchDataMap; | 163 typedef ResourcePrefetchPredictorTables::PrefetchDataMap PrefetchDataMap; |
| 166 typedef std::map<NavigationID, linked_ptr<std::vector<URLRequestSummary> > > | 164 typedef std::map<NavigationID, linked_ptr<std::vector<URLRequestSummary> > > |
| 167 NavigationMap; | 165 NavigationMap; |
| 168 | 166 |
| 169 // Returns true if the main page request is supported for prediction. | 167 // Returns true if the main page request is supported for prediction. |
| 170 static bool IsHandledMainPage(net::URLRequest* request); | 168 static bool IsHandledMainPage(net::URLRequest* request); |
| 171 | 169 |
| 172 // Returns true if the subresource request is supported for prediction. | 170 // Returns true if the subresource request is supported for prediction. |
| 173 static bool IsHandledSubresource(net::URLRequest* request, | 171 static bool IsHandledSubresource(net::URLRequest* request, |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 | 298 |
| 301 ScopedObserver<history::HistoryService, history::HistoryServiceObserver> | 299 ScopedObserver<history::HistoryService, history::HistoryServiceObserver> |
| 302 history_service_observer_; | 300 history_service_observer_; |
| 303 | 301 |
| 304 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictor); | 302 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictor); |
| 305 }; | 303 }; |
| 306 | 304 |
| 307 } // namespace predictors | 305 } // namespace predictors |
| 308 | 306 |
| 309 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ | 307 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ |
| OLD | NEW |