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 14 matching lines...) Expand all Loading... |
25 bool always_revalidate); | 25 bool always_revalidate); |
26 | 26 |
27 void InitializeRedirectStat(RedirectStat* redirect, | 27 void InitializeRedirectStat(RedirectStat* redirect, |
28 const std::string& url, | 28 const std::string& url, |
29 int number_of_hits, | 29 int number_of_hits, |
30 int number_of_misses, | 30 int number_of_misses, |
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 precache::PrecacheResource::Type type); |
36 | 37 |
37 void InitializeOriginStat(OriginStat* origin_stat, | 38 void InitializeOriginStat(OriginStat* origin_stat, |
38 const std::string& origin, | 39 const std::string& origin, |
39 int number_of_hits, | 40 int number_of_hits, |
40 int number_of_misses, | 41 int number_of_misses, |
41 int consecutive_misses, | 42 int consecutive_misses, |
42 double average_position, | 43 double average_position, |
43 bool always_access_network, | 44 bool always_access_network, |
44 bool accessed_network); | 45 bool accessed_network); |
45 | 46 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 const PrecacheManifest& manifest); | 112 const PrecacheManifest& manifest); |
112 std::ostream& operator<<(std::ostream& stream, | 113 std::ostream& operator<<(std::ostream& stream, |
113 const PrecacheResource& resource); | 114 const PrecacheResource& resource); |
114 | 115 |
115 bool operator==(const PrecacheManifest& lhs, const PrecacheManifest& rhs); | 116 bool operator==(const PrecacheManifest& lhs, const PrecacheManifest& rhs); |
116 bool operator==(const PrecacheResource& lhs, const PrecacheResource& rhs); | 117 bool operator==(const PrecacheResource& lhs, const PrecacheResource& rhs); |
117 | 118 |
118 } // namespace precache | 119 } // namespace precache |
119 | 120 |
120 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ | 121 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ |
OLD | NEW |