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

Unified Diff: chrome/browser/predictors/resource_prefetch_predictor.h

Issue 2825693002: predictors: Prefetch resources from manifest. (Closed)
Patch Set: Add comment. Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/predictors/resource_prefetch_predictor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/predictors/resource_prefetch_predictor.h
diff --git a/chrome/browser/predictors/resource_prefetch_predictor.h b/chrome/browser/predictors/resource_prefetch_predictor.h
index 750ac83bf01caf114b54e73ea326ccb7b759b08f..fa4469ca1a0ab332e50b5349fa0d697714adce60 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor.h
+++ b/chrome/browser/predictors/resource_prefetch_predictor.h
@@ -63,7 +63,9 @@ constexpr char kResourcePrefetchPredictorPrefetchMissesSize[] =
constexpr char kResourcePrefetchPredictorRedirectStatusHistogram[] =
"ResourcePrefetchPredictor.RedirectStatus";
+const uint32_t kVersionedRemovedExperiment = 0x03ff25e3;
const uint32_t kUnusedRemovedExperiment = 0xf7f77166;
+const uint32_t kNoStoreRemovedExperiment = 0xd90a199a;
} // namespace internal
class TestObserver;
@@ -288,6 +290,7 @@ class ResourcePrefetchPredictor
FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, HandledResourceTypes);
FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest,
PopulatePrefetcherRequest);
+ FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, PopulateFromManifest);
FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, GetRedirectEndpoint);
FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, GetPrefetchData);
FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest,
@@ -359,11 +362,17 @@ class ResourcePrefetchPredictor
// Returns true iff the |data_map| contains PrefetchData that can be used
// for a |main_frame_key| and fills |urls| with resources that need to be
- // prefetched. |urls| pointer may be equal nullptr to get return value only.
+ // prefetched. |urls| may be nullptr to get the return value only.
bool PopulatePrefetcherRequest(const std::string& main_frame_key,
const PrefetchDataMap& data_map,
std::vector<GURL>* urls) const;
+ // Returns true iff the manifest table contains PrecacheManifest that can be
+ // used for a |manifest_host| and fills |urls| with resources that need to be
+ // prefetched. |urls| may be nullptr to get the return value only.
+ bool PopulateFromManifest(const std::string& manifest_host,
+ std::vector<GURL>* urls) const;
+
// Callback for task to read predictor database. Takes ownership of
// all arguments.
void CreateCaches(std::unique_ptr<PrefetchDataMap> url_data_map,
« no previous file with comments | « no previous file | chrome/browser/predictors/resource_prefetch_predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698