OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ | 4 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ |
5 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ | 5 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "chrome/browser/predictors/resource_prefetch_predictor.h" | 10 #include "chrome/browser/predictors/resource_prefetch_predictor.h" |
(...skipping 16 matching lines...) Expand all Loading... | |
27 const std::string& url, | 27 const std::string& url, |
28 int number_of_hits, | 28 int number_of_hits, |
29 int number_of_misses, | 29 int number_of_misses, |
30 int consecutive_misses); | 30 int consecutive_misses); |
31 | 31 |
32 PrefetchData CreatePrefetchData(const std::string& primary_key, | 32 PrefetchData CreatePrefetchData(const std::string& primary_key, |
33 uint64_t last_visit_time = 0); | 33 uint64_t last_visit_time = 0); |
34 RedirectData CreateRedirectData(const std::string& primary_key, | 34 RedirectData CreateRedirectData(const std::string& primary_key, |
35 uint64_t last_visit_time = 0); | 35 uint64_t last_visit_time = 0); |
36 | 36 |
37 NavigationID CreateNavigationID(int process_id, | 37 NavigationID CreateNavigationID(int session_id, |
Benoit L
2016/12/20 09:53:39
SessionID is not an int, it's a SessionID::id_type
ahemery
2016/12/20 13:00:00
Updated with proper type
| |
38 int render_frame_id, | |
39 const std::string& main_frame_url); | 38 const std::string& main_frame_url); |
40 | 39 |
41 ResourcePrefetchPredictor::PageRequestSummary CreatePageRequestSummary( | 40 ResourcePrefetchPredictor::PageRequestSummary CreatePageRequestSummary( |
42 const std::string& main_frame_url, | 41 const std::string& main_frame_url, |
43 const std::string& initial_url, | 42 const std::string& initial_url, |
44 const std::vector<ResourcePrefetchPredictor::URLRequestSummary>& | 43 const std::vector<ResourcePrefetchPredictor::URLRequestSummary>& |
45 subresource_requests); | 44 subresource_requests); |
46 | 45 |
47 ResourcePrefetchPredictor::URLRequestSummary CreateURLRequestSummary( | 46 ResourcePrefetchPredictor::URLRequestSummary CreateURLRequestSummary( |
48 int process_id, | 47 int tab_id, |
Benoit L
2016/12/20 09:53:39
nit: There is session_id and tab_id in the code. I
ahemery
2016/12/20 13:00:00
Everything unified to session_id
alexilin
2016/12/20 14:06:47
The same remark about SessionID::id_type.
| |
49 int render_frame_id, | |
50 const std::string& main_frame_url, | 48 const std::string& main_frame_url, |
51 const std::string& resource_url = std::string(), | 49 const std::string& resource_url = std::string(), |
52 content::ResourceType resource_type = content::RESOURCE_TYPE_MAIN_FRAME, | 50 content::ResourceType resource_type = content::RESOURCE_TYPE_MAIN_FRAME, |
53 net::RequestPriority priority = net::MEDIUM, | 51 net::RequestPriority priority = net::MEDIUM, |
54 const std::string& mime_type = std::string(), | 52 const std::string& mime_type = std::string(), |
55 bool was_cached = false, | 53 bool was_cached = false, |
56 const std::string& redirect_url = std::string(), | 54 const std::string& redirect_url = std::string(), |
57 bool has_validators = false, | 55 bool has_validators = false, |
58 bool always_revalidate = false); | 56 bool always_revalidate = false); |
59 | 57 |
(...skipping 15 matching lines...) Expand all Loading... | |
75 bool operator==(const RedirectData& lhs, const RedirectData& rhs); | 73 bool operator==(const RedirectData& lhs, const RedirectData& rhs); |
76 bool operator==(const RedirectStat& lhs, const RedirectStat& rhs); | 74 bool operator==(const RedirectStat& lhs, const RedirectStat& rhs); |
77 bool operator==(const ResourcePrefetchPredictor::PageRequestSummary& lhs, | 75 bool operator==(const ResourcePrefetchPredictor::PageRequestSummary& lhs, |
78 const ResourcePrefetchPredictor::PageRequestSummary& rhs); | 76 const ResourcePrefetchPredictor::PageRequestSummary& rhs); |
79 bool operator==(const ResourcePrefetchPredictor::URLRequestSummary& lhs, | 77 bool operator==(const ResourcePrefetchPredictor::URLRequestSummary& lhs, |
80 const ResourcePrefetchPredictor::URLRequestSummary& rhs); | 78 const ResourcePrefetchPredictor::URLRequestSummary& rhs); |
81 | 79 |
82 } // namespace predictors | 80 } // namespace predictors |
83 | 81 |
84 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ | 82 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ |
OLD | NEW |