| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 bool accessed_network); | 44 bool accessed_network); |
| 45 | 45 |
| 46 void InitializeExperiment(precache::PrecacheManifest* manifest, | 46 void InitializeExperiment(precache::PrecacheManifest* manifest, |
| 47 uint32_t experiment_id, | 47 uint32_t experiment_id, |
| 48 const std::vector<bool>& bitset); | 48 const std::vector<bool>& bitset); |
| 49 | 49 |
| 50 PrefetchData CreatePrefetchData(const std::string& primary_key, | 50 PrefetchData CreatePrefetchData(const std::string& primary_key, |
| 51 uint64_t last_visit_time = 0); | 51 uint64_t last_visit_time = 0); |
| 52 RedirectData CreateRedirectData(const std::string& primary_key, | 52 RedirectData CreateRedirectData(const std::string& primary_key, |
| 53 uint64_t last_visit_time = 0); | 53 uint64_t last_visit_time = 0); |
| 54 precache::PrecacheManifest CreateManifestData(uint64_t id = 0); | 54 precache::PrecacheManifest CreateManifestData(int64_t id = 0); |
| 55 OriginData CreateOriginData(const std::string& host, | 55 OriginData CreateOriginData(const std::string& host, |
| 56 uint64_t last_visit_time = 0); | 56 uint64_t last_visit_time = 0); |
| 57 | 57 |
| 58 NavigationID CreateNavigationID(SessionID::id_type tab_id, | 58 NavigationID CreateNavigationID(SessionID::id_type tab_id, |
| 59 const std::string& main_frame_url); | 59 const std::string& main_frame_url); |
| 60 | 60 |
| 61 ResourcePrefetchPredictor::PageRequestSummary CreatePageRequestSummary( | 61 ResourcePrefetchPredictor::PageRequestSummary CreatePageRequestSummary( |
| 62 const std::string& main_frame_url, | 62 const std::string& main_frame_url, |
| 63 const std::string& initial_url, | 63 const std::string& initial_url, |
| 64 const std::vector<ResourcePrefetchPredictor::URLRequestSummary>& | 64 const std::vector<ResourcePrefetchPredictor::URLRequestSummary>& |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 const PrecacheManifest& manifest); | 111 const PrecacheManifest& manifest); |
| 112 std::ostream& operator<<(std::ostream& stream, | 112 std::ostream& operator<<(std::ostream& stream, |
| 113 const PrecacheResource& resource); | 113 const PrecacheResource& resource); |
| 114 | 114 |
| 115 bool operator==(const PrecacheManifest& lhs, const PrecacheManifest& rhs); | 115 bool operator==(const PrecacheManifest& lhs, const PrecacheManifest& rhs); |
| 116 bool operator==(const PrecacheResource& lhs, const PrecacheResource& rhs); | 116 bool operator==(const PrecacheResource& lhs, const PrecacheResource& rhs); |
| 117 | 117 |
| 118 } // namespace precache | 118 } // namespace precache |
| 119 | 119 |
| 120 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ | 120 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_ |
| OLD | NEW |