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

Side by Side Diff: chrome/browser/predictors/resource_prefetch_predictor_test_util.h

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

Powered by Google App Engine
This is Rietveld 408576698