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 | 4 |
5 #include "chrome/browser/predictors/resource_prefetch_predictor_test_util.h" | 5 #include "chrome/browser/predictors/resource_prefetch_predictor_test_util.h" |
6 | 6 |
7 #include "chrome/browser/predictors/resource_prefetch_predictor_tables.h" | 7 #include "chrome/browser/predictors/resource_prefetch_predictor_tables.h" |
8 | 8 |
9 namespace predictors { | 9 namespace predictors { |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 uint64_t last_visit_time) { | 56 uint64_t last_visit_time) { |
57 RedirectData data; | 57 RedirectData data; |
58 data.set_primary_key(primary_key); | 58 data.set_primary_key(primary_key); |
59 data.set_last_visit_time(last_visit_time); | 59 data.set_last_visit_time(last_visit_time); |
60 return data; | 60 return data; |
61 } | 61 } |
62 | 62 |
63 NavigationID CreateNavigationID(int process_id, | 63 NavigationID CreateNavigationID(int process_id, |
64 int render_frame_id, | 64 int render_frame_id, |
65 const std::string& main_frame_url) { | 65 const std::string& main_frame_url) { |
66 NavigationID navigation_id(process_id, render_frame_id, GURL(main_frame_url)); | 66 NavigationID navigation_id; |
| 67 navigation_id.render_process_id = process_id; |
| 68 navigation_id.render_frame_id = render_frame_id; |
| 69 navigation_id.main_frame_url = GURL(main_frame_url); |
67 navigation_id.creation_time = base::TimeTicks::Now(); | 70 navigation_id.creation_time = base::TimeTicks::Now(); |
68 return navigation_id; | 71 return navigation_id; |
69 } | 72 } |
70 | 73 |
71 PageRequestSummary CreatePageRequestSummary( | 74 PageRequestSummary CreatePageRequestSummary( |
72 const std::string& main_frame_url, | 75 const std::string& main_frame_url, |
73 const std::string& initial_url, | 76 const std::string& initial_url, |
74 const std::vector<URLRequestSummary>& subresource_requests) { | 77 const std::vector<URLRequestSummary>& subresource_requests) { |
75 GURL main_frame_gurl(main_frame_url); | 78 GURL main_frame_gurl(main_frame_url); |
76 PageRequestSummary summary(main_frame_gurl); | 79 PageRequestSummary summary(main_frame_gurl); |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 lhs.resource_url == rhs.resource_url && | 219 lhs.resource_url == rhs.resource_url && |
217 lhs.resource_type == rhs.resource_type && | 220 lhs.resource_type == rhs.resource_type && |
218 lhs.priority == rhs.priority && lhs.mime_type == rhs.mime_type && | 221 lhs.priority == rhs.priority && lhs.mime_type == rhs.mime_type && |
219 lhs.was_cached == rhs.was_cached && | 222 lhs.was_cached == rhs.was_cached && |
220 lhs.redirect_url == rhs.redirect_url && | 223 lhs.redirect_url == rhs.redirect_url && |
221 lhs.has_validators == rhs.has_validators && | 224 lhs.has_validators == rhs.has_validators && |
222 lhs.always_revalidate == rhs.always_revalidate; | 225 lhs.always_revalidate == rhs.always_revalidate; |
223 } | 226 } |
224 | 227 |
225 } // namespace predictors | 228 } // namespace predictors |
OLD | NEW |