Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(618)

Unified Diff: chrome/browser/predictors/resource_prefetch_predictor_test_util.h

Issue 2355273002: Redirect handling in the resource_prefetch_predictor. (Closed)
Patch Set: Fix compilation complaints. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..ff707a319f061114f19ef5167231197cb34a1c70 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,14 +20,26 @@ 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);
+
+RedirectData CreateRedirectData(const std::string& primary_key);
+
// For printing failures nicely.
-void PrintTo(const ResourceData& resource, ::std::ostream* os);
void PrintTo(const ResourcePrefetchPredictorTables::PrefetchData& data,
::std::ostream* os);
+void PrintTo(const ResourceData& resource, ::std::ostream* os);
+void PrintTo(const RedirectStat& redirect, ::std::ostream* os);
+void PrintTo(const RedirectData& data, ::std::ostream* os);
-bool operator==(const ResourceData& lhs, const ResourceData& rhs);
bool operator==(const ResourcePrefetchPredictorTables::PrefetchData& lhs,
const ResourcePrefetchPredictorTables::PrefetchData& rhs);
+bool operator==(const ResourceData& lhs, const ResourceData& rhs);
+bool operator==(const RedirectStat& lhs, const RedirectStat& rhs);
+bool operator==(const RedirectData& lhs, const RedirectData& rhs);
} // namespace predictors

Powered by Google App Engine
This is Rietveld 408576698