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

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

Issue 2268283005: predictors: Refactor the resource_prefetch_predictor database handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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.pb.h"
8 #include "chrome/browser/predictors/resource_prefetch_predictor_tables.h"
9 #include "content/public/common/resource_type.h"
10 #include "net/base/request_priority.h"
11
12 class ostream;
13
14 namespace predictors {
15
16 ::chrome_browser_predictors::ResourceData MakeResourceData(
17 std::string resource_url,
18 content::ResourceType resource_type,
19 int number_of_hits,
20 int number_of_misses,
21 int consecutive_misses,
22 double average_position,
23 net::RequestPriority priority,
24 bool has_validators,
25 bool always_revalidate);
26
27 // For printing failures nicely.
28 void PrintTo(const ::chrome_browser_predictors::ResourceData& resource,
29 ::std::ostream* os);
30 void PrintTo(const ResourcePrefetchPredictorTables::PrefetchData& data,
31 ::std::ostream* os);
32
33 bool operator==(const ::chrome_browser_predictors::ResourceData& lhs,
34 const ::chrome_browser_predictors::ResourceData& rhs);
35
36 bool operator==(const ResourcePrefetchPredictorTables::PrefetchData& lhs,
37 const ResourcePrefetchPredictorTables::PrefetchData& rhs);
38
39 } // namespace predictors
40
41 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698