| 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 class ostream; |
| 10 |
| 11 namespace predictors { |
| 12 |
| 13 ResourceData CreateResourceData(const std::string& resource_url, |
| 14 content::ResourceType resource_type, |
| 15 int number_of_hits, |
| 16 int number_of_misses, |
| 17 int consecutive_misses, |
| 18 double average_position, |
| 19 net::RequestPriority priority, |
| 20 bool has_validators, |
| 21 bool always_revalidate); |
| 22 |
| 23 // For printing failures nicely. |
| 24 void PrintTo(const ResourceData& resource, ::std::ostream* os); |
| 25 void PrintTo(const ResourcePrefetchPredictorTables::PrefetchData& data, |
| 26 ::std::ostream* os); |
| 27 |
| 28 bool operator==(const ResourceData& lhs, const ResourceData& rhs); |
| 29 bool operator==(const ResourcePrefetchPredictorTables::PrefetchData& lhs, |
| 30 const ResourcePrefetchPredictorTables::PrefetchData& rhs); |
| 31 |
| 32 } // namespace predictors |
| 33 |
| 34 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ |
| OLD | NEW |