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

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

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

Powered by Google App Engine
This is Rietveld 408576698