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

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

Issue 2195503003: predictors: Add the request priority to the reource_prefetch_predictor DB. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fix. Created 4 years, 5 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
Index: chrome/browser/predictors/resource_prefetch_predictor_tables.h
diff --git a/chrome/browser/predictors/resource_prefetch_predictor_tables.h b/chrome/browser/predictors/resource_prefetch_predictor_tables.h
index 18c9473a72ff3f2e7d8037073e3a9aa9ea8ccd43..073df33e01f3b9346e4695eea59732a5368eee70 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor_tables.h
+++ b/chrome/browser/predictors/resource_prefetch_predictor_tables.h
@@ -16,6 +16,7 @@
#include "chrome/browser/predictors/predictor_table_base.h"
#include "chrome/browser/predictors/resource_prefetch_common.h"
#include "content/public/common/resource_type.h"
+#include "net/base/request_priority.h"
#include "url/gurl.h"
namespace sql {
@@ -46,7 +47,8 @@ class ResourcePrefetchPredictorTables : public PredictorTableBase {
int number_of_hits,
int number_of_misses,
int consecutive_misses,
- double average_position);
+ double average_position,
+ net::RequestPriority priority);
void UpdateScore();
bool operator==(const ResourceRow& rhs) const;
@@ -61,6 +63,7 @@ class ResourcePrefetchPredictorTables : public PredictorTableBase {
size_t number_of_misses;
size_t consecutive_misses;
double average_position;
+ net::RequestPriority priority;
// Not stored.
float score;
@@ -142,6 +145,8 @@ class ResourcePrefetchPredictorTables : public PredictorTableBase {
void CreateTableIfNonExistent() override;
void LogDatabaseStats() override;
+ bool DropTablesIfOutdated(sql::Connection* db);
+
// Helpers to return Statements for cached Statements. The caller must take
// ownership of the return Statements.
sql::Statement* GetUrlResourceDeleteStatement();

Powered by Google App Engine
This is Rietveld 408576698