| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ | 4 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ |
| 5 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ | 5 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "chrome/browser/predictors/resource_prefetch_predictor.h" | 10 #include "chrome/browser/predictors/resource_prefetch_predictor.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 int consecutive_misses); | 31 int consecutive_misses); |
| 32 | 32 |
| 33 void InitializePrecacheResource(precache::PrecacheResource* resource, | 33 void InitializePrecacheResource(precache::PrecacheResource* resource, |
| 34 const std::string& url, | 34 const std::string& url, |
| 35 double weight_ratio); | 35 double weight_ratio); |
| 36 | 36 |
| 37 PrefetchData CreatePrefetchData(const std::string& primary_key, | 37 PrefetchData CreatePrefetchData(const std::string& primary_key, |
| 38 uint64_t last_visit_time = 0); | 38 uint64_t last_visit_time = 0); |
| 39 RedirectData CreateRedirectData(const std::string& primary_key, | 39 RedirectData CreateRedirectData(const std::string& primary_key, |
| 40 uint64_t last_visit_time = 0); | 40 uint64_t last_visit_time = 0); |
| 41 precache::PrecacheManifest CreateManifestData(uint64_t id = 0); |
| 41 | 42 |
| 42 NavigationID CreateNavigationID(SessionID::id_type tab_id, | 43 NavigationID CreateNavigationID(SessionID::id_type tab_id, |
| 43 const std::string& main_frame_url); | 44 const std::string& main_frame_url); |
| 44 | 45 |
| 45 ResourcePrefetchPredictor::PageRequestSummary CreatePageRequestSummary( | 46 ResourcePrefetchPredictor::PageRequestSummary CreatePageRequestSummary( |
| 46 const std::string& main_frame_url, | 47 const std::string& main_frame_url, |
| 47 const std::string& initial_url, | 48 const std::string& initial_url, |
| 48 const std::vector<ResourcePrefetchPredictor::URLRequestSummary>& | 49 const std::vector<ResourcePrefetchPredictor::URLRequestSummary>& |
| 49 subresource_requests); | 50 subresource_requests); |
| 50 | 51 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 const PrecacheManifest& manifest); | 91 const PrecacheManifest& manifest); |
| 91 std::ostream& operator<<(std::ostream& stream, | 92 std::ostream& operator<<(std::ostream& stream, |
| 92 const PrecacheResource& resource); | 93 const PrecacheResource& resource); |
| 93 | 94 |
| 94 bool operator==(const PrecacheManifest& lhs, const PrecacheManifest& rhs); | 95 bool operator==(const PrecacheManifest& lhs, const PrecacheManifest& rhs); |
| 95 bool operator==(const PrecacheResource& lhs, const PrecacheResource& rhs); | 96 bool operator==(const PrecacheResource& lhs, const PrecacheResource& rhs); |
| 96 | 97 |
| 97 } // namespace precache | 98 } // namespace precache |
| 98 | 99 |
| 99 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ | 100 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ |
| OLD | NEW |