| 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
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ee3dac1534385a4eb2cee7ce065c0b8cdc9dbe26
|
| --- /dev/null
|
| +++ b/chrome/browser/predictors/resource_prefetch_predictor_test_util.h
|
| @@ -0,0 +1,41 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +#ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_
|
| +#define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_
|
| +
|
| +#include "chrome/browser/predictors/resource_prefetch_predictor.pb.h"
|
| +#include "chrome/browser/predictors/resource_prefetch_predictor_tables.h"
|
| +#include "content/public/common/resource_type.h"
|
| +#include "net/base/request_priority.h"
|
| +
|
| +class ostream;
|
| +
|
| +namespace predictors {
|
| +
|
| +::chrome_browser_predictors::ResourceData MakeResourceData(
|
| + std::string resource_url,
|
| + content::ResourceType resource_type,
|
| + int number_of_hits,
|
| + int number_of_misses,
|
| + int consecutive_misses,
|
| + double average_position,
|
| + net::RequestPriority priority,
|
| + bool has_validators,
|
| + bool always_revalidate);
|
| +
|
| +// For printing failures nicely.
|
| +void PrintTo(const ::chrome_browser_predictors::ResourceData& resource,
|
| + ::std::ostream* os);
|
| +void PrintTo(const ResourcePrefetchPredictorTables::PrefetchData& data,
|
| + ::std::ostream* os);
|
| +
|
| +bool operator==(const ::chrome_browser_predictors::ResourceData& lhs,
|
| + const ::chrome_browser_predictors::ResourceData& rhs);
|
| +
|
| +bool operator==(const ResourcePrefetchPredictorTables::PrefetchData& lhs,
|
| + const ResourcePrefetchPredictorTables::PrefetchData& rhs);
|
| +
|
| +} // namespace predictors
|
| +
|
| +#endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_
|
|
|