| 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 | 8 |
| 9 #include "chrome/browser/predictors/resource_prefetch_predictor_tables.h" | 9 #include "chrome/browser/predictors/resource_prefetch_predictor_tables.h" |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 int number_of_hits, | 26 int number_of_hits, |
| 27 int number_of_misses, | 27 int number_of_misses, |
| 28 int consecutive_misses); | 28 int consecutive_misses); |
| 29 | 29 |
| 30 PrefetchData CreatePrefetchData(const std::string& primary_key, | 30 PrefetchData CreatePrefetchData(const std::string& primary_key, |
| 31 uint64_t last_visit_time = 0); | 31 uint64_t last_visit_time = 0); |
| 32 RedirectData CreateRedirectData(const std::string& primary_key, | 32 RedirectData CreateRedirectData(const std::string& primary_key, |
| 33 uint64_t last_visit_time = 0); | 33 uint64_t last_visit_time = 0); |
| 34 | 34 |
| 35 // For printing failures nicely. | 35 // For printing failures nicely. |
| 36 void PrintTo(const PrefetchData& data, ::std::ostream* os); | 36 std::ostream& operator<<(std::ostream& stream, const PrefetchData& data); |
| 37 void PrintTo(const ResourceData& resource, ::std::ostream* os); | 37 std::ostream& operator<<(std::ostream& stream, const ResourceData& resource); |
| 38 void PrintTo(const RedirectData& data, ::std::ostream* os); | 38 std::ostream& operator<<(std::ostream& stream, const RedirectData& data); |
| 39 void PrintTo(const RedirectStat& redirect, ::std::ostream* os); | 39 std::ostream& operator<<(std::ostream& stream, const RedirectStat& redirect); |
| 40 | 40 |
| 41 bool operator==(const PrefetchData& lhs, const PrefetchData& rhs); | 41 bool operator==(const PrefetchData& lhs, const PrefetchData& rhs); |
| 42 bool operator==(const ResourceData& lhs, const ResourceData& rhs); | 42 bool operator==(const ResourceData& lhs, const ResourceData& rhs); |
| 43 bool operator==(const RedirectData& lhs, const RedirectData& rhs); | 43 bool operator==(const RedirectData& lhs, const RedirectData& rhs); |
| 44 bool operator==(const RedirectStat& lhs, const RedirectStat& rhs); | 44 bool operator==(const RedirectStat& lhs, const RedirectStat& rhs); |
| 45 | 45 |
| 46 } // namespace predictors | 46 } // namespace predictors |
| 47 | 47 |
| 48 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ | 48 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ |
| OLD | NEW |