| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 public: | 78 public: |
| 79 // Stores the data that we need to get from the URLRequest. | 79 // Stores the data that we need to get from the URLRequest. |
| 80 struct URLRequestSummary { | 80 struct URLRequestSummary { |
| 81 URLRequestSummary(); | 81 URLRequestSummary(); |
| 82 URLRequestSummary(const URLRequestSummary& other); | 82 URLRequestSummary(const URLRequestSummary& other); |
| 83 ~URLRequestSummary(); | 83 ~URLRequestSummary(); |
| 84 | 84 |
| 85 NavigationID navigation_id; | 85 NavigationID navigation_id; |
| 86 GURL resource_url; | 86 GURL resource_url; |
| 87 content::ResourceType resource_type; | 87 content::ResourceType resource_type; |
| 88 net::RequestPriority priority; |
| 88 | 89 |
| 89 // Only for responses. | 90 // Only for responses. |
| 90 std::string mime_type; | 91 std::string mime_type; |
| 91 bool was_cached; | 92 bool was_cached; |
| 92 GURL redirect_url; // Empty unless request was redirected to a valid url. | 93 GURL redirect_url; // Empty unless request was redirected to a valid url. |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 ResourcePrefetchPredictor(const ResourcePrefetchPredictorConfig& config, | 96 ResourcePrefetchPredictor(const ResourcePrefetchPredictorConfig& config, |
| 96 Profile* profile); | 97 Profile* profile); |
| 97 ~ResourcePrefetchPredictor() override; | 98 ~ResourcePrefetchPredictor() override; |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 | 333 |
| 333 ScopedObserver<history::HistoryService, history::HistoryServiceObserver> | 334 ScopedObserver<history::HistoryService, history::HistoryServiceObserver> |
| 334 history_service_observer_; | 335 history_service_observer_; |
| 335 | 336 |
| 336 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictor); | 337 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictor); |
| 337 }; | 338 }; |
| 338 | 339 |
| 339 } // namespace predictors | 340 } // namespace predictors |
| 340 | 341 |
| 341 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ | 342 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ |
| OLD | NEW |