| Index: chrome/browser/predictors/resource_prefetch_predictor_test_util.h
|
| diff --git a/chrome/browser/predictors/resource_prefetch_predictor_test_util.h b/chrome/browser/predictors/resource_prefetch_predictor_test_util.h
|
| index c07fc13b8bd2e6cd15b6526177a68913594b9138..a0b1283d8ebb1ca9f06a26a9b35f12d308470f94 100644
|
| --- a/chrome/browser/predictors/resource_prefetch_predictor_test_util.h
|
| +++ b/chrome/browser/predictors/resource_prefetch_predictor_test_util.h
|
| @@ -4,6 +4,8 @@
|
| #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_
|
| #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_
|
|
|
| +#include <string>
|
| +
|
| #include "chrome/browser/predictors/resource_prefetch_predictor_tables.h"
|
|
|
| namespace predictors {
|
| @@ -18,15 +20,35 @@ ResourceData CreateResourceData(const std::string& resource_url,
|
| bool has_validators,
|
| bool always_revalidate);
|
|
|
| +void InitializeRedirectStat(RedirectStat* redirect,
|
| + const std::string& url,
|
| + int number_of_hits,
|
| + int number_of_misses,
|
| + int consecutive_misses);
|
| +
|
| // For printing failures nicely.
|
| -void PrintTo(const ResourceData& resource, ::std::ostream* os);
|
| void PrintTo(const ResourcePrefetchPredictorTables::PrefetchData& data,
|
| ::std::ostream* os);
|
|
|
| -bool operator==(const ResourceData& lhs, const ResourceData& rhs);
|
| bool operator==(const ResourcePrefetchPredictorTables::PrefetchData& lhs,
|
| const ResourcePrefetchPredictorTables::PrefetchData& rhs);
|
|
|
| } // namespace predictors
|
|
|
| +// These functions should be declared in the same namespace as the classes
|
| +// ResourceData, ResourceData_RedirectStat, RedirectData. Otherwise,
|
| +// Google Mock can't find these declarations.
|
| +namespace chrome_browser_predictors {
|
| +
|
| +void PrintTo(const ResourceData& resource, ::std::ostream* os);
|
| +void PrintTo(const RedirectData_RedirectStat& redirect, ::std::ostream* os);
|
| +void PrintTo(const RedirectData& data, ::std::ostream* os);
|
| +
|
| +bool operator==(const ResourceData& lhs, const ResourceData& rhs);
|
| +bool operator==(const RedirectData_RedirectStat& lhs,
|
| + const RedirectData_RedirectStat& rhs);
|
| +bool operator==(const RedirectData& lhs, const RedirectData& rhs);
|
| +
|
| +} // namespace chrome_browser_predictors
|
| +
|
| #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_
|
|
|