| 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 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 void InitializeOriginStat(OriginStat* origin_stat, | 37 void InitializeOriginStat(OriginStat* origin_stat, |
| 38 const std::string& origin, | 38 const std::string& origin, |
| 39 int number_of_hits, | 39 int number_of_hits, |
| 40 int number_of_misses, | 40 int number_of_misses, |
| 41 int consecutive_misses, | 41 int consecutive_misses, |
| 42 double average_position, | 42 double average_position, |
| 43 bool always_access_network, | 43 bool always_access_network, |
| 44 bool accessed_network); | 44 bool accessed_network); |
| 45 | 45 |
| 46 void InitializeExperiment(precache::PrecacheManifest* manifest, |
| 47 uint32_t experiment_id, |
| 48 const std::vector<bool>& bitset); |
| 49 |
| 46 PrefetchData CreatePrefetchData(const std::string& primary_key, | 50 PrefetchData CreatePrefetchData(const std::string& primary_key, |
| 47 uint64_t last_visit_time = 0); | 51 uint64_t last_visit_time = 0); |
| 48 RedirectData CreateRedirectData(const std::string& primary_key, | 52 RedirectData CreateRedirectData(const std::string& primary_key, |
| 49 uint64_t last_visit_time = 0); | 53 uint64_t last_visit_time = 0); |
| 50 precache::PrecacheManifest CreateManifestData(uint64_t id = 0); | 54 precache::PrecacheManifest CreateManifestData(uint64_t id = 0); |
| 51 OriginData CreateOriginData(const std::string& host, | 55 OriginData CreateOriginData(const std::string& host, |
| 52 uint64_t last_visit_time = 0); | 56 uint64_t last_visit_time = 0); |
| 53 | 57 |
| 54 NavigationID CreateNavigationID(SessionID::id_type tab_id, | 58 NavigationID CreateNavigationID(SessionID::id_type tab_id, |
| 55 const std::string& main_frame_url); | 59 const std::string& main_frame_url); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 const PrecacheManifest& manifest); | 111 const PrecacheManifest& manifest); |
| 108 std::ostream& operator<<(std::ostream& stream, | 112 std::ostream& operator<<(std::ostream& stream, |
| 109 const PrecacheResource& resource); | 113 const PrecacheResource& resource); |
| 110 | 114 |
| 111 bool operator==(const PrecacheManifest& lhs, const PrecacheManifest& rhs); | 115 bool operator==(const PrecacheManifest& lhs, const PrecacheManifest& rhs); |
| 112 bool operator==(const PrecacheResource& lhs, const PrecacheResource& rhs); | 116 bool operator==(const PrecacheResource& lhs, const PrecacheResource& rhs); |
| 113 | 117 |
| 114 } // namespace precache | 118 } // namespace precache |
| 115 | 119 |
| 116 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ | 120 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ |
| OLD | NEW |