| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ |
| 5 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ |
| 6 |
| 7 #include "chrome/browser/predictors/resource_prefetch_predictor_tables.h" |
| 8 |
| 9 namespace predictors { |
| 10 |
| 11 ResourceData CreateResourceData(const std::string& resource_url, |
| 12 content::ResourceType resource_type, |
| 13 int number_of_hits, |
| 14 int number_of_misses, |
| 15 int consecutive_misses, |
| 16 double average_position, |
| 17 net::RequestPriority priority, |
| 18 bool has_validators, |
| 19 bool always_revalidate); |
| 20 |
| 21 // For printing failures nicely. |
| 22 void PrintTo(const ResourceData& resource, ::std::ostream* os); |
| 23 void PrintTo(const ResourcePrefetchPredictorTables::PrefetchData& data, |
| 24 ::std::ostream* os); |
| 25 |
| 26 bool operator==(const ResourceData& lhs, const ResourceData& rhs); |
| 27 bool operator==(const ResourcePrefetchPredictorTables::PrefetchData& lhs, |
| 28 const ResourcePrefetchPredictorTables::PrefetchData& rhs); |
| 29 |
| 30 } // namespace predictors |
| 31 |
| 32 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ |
| OLD | NEW |