Chromium Code Reviews| 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 a089544274e6e1adb21e7fa1eef17e917b605a6b..bdb14fe9397653cfd6e299ddf90b5ac306a91168 100644 |
| --- a/chrome/browser/predictors/resource_prefetch_predictor_tables.h |
| +++ b/chrome/browser/predictors/resource_prefetch_predictor_tables.h |
| @@ -44,8 +44,7 @@ class ResourcePrefetchPredictorTables : public PredictorTableBase { |
| struct ResourceRow { |
| ResourceRow(); |
| ResourceRow(const ResourceRow& other); |
| - ResourceRow(const std::string& main_frame_url, |
| - const std::string& resource_url, |
| + ResourceRow(const std::string& resource_url, |
| content::ResourceType resource_type, |
| int number_of_hits, |
| int number_of_misses, |
| @@ -59,11 +58,6 @@ class ResourcePrefetchPredictorTables : public PredictorTableBase { |
| static void FromProto(const ResourceData& proto, ResourceRow* row); |
| void ToProto(ResourceData* resource_data) const; |
| - // Stores the host for host based data, main frame Url for the Url based |
| - // data. This field is cleared for efficiency reasons and the code outside |
| - // this class should not assume it is set. |
| - std::string primary_key; |
| - |
| GURL resource_url; |
| content::ResourceType resource_type; |
| size_t number_of_hits; |
|
pasko
2016/08/26 13:40:30
Do we want to still plumb these one by one in From
Benoit L
2016/08/29 13:11:39
If the proto doesn't reflect everything and needs
|
| @@ -126,7 +120,7 @@ class ResourcePrefetchPredictorTables : public PredictorTableBase { |
| virtual void DeleteAllData(); |
| // The maximum length of the string that can be stored in the DB. |
| - static const size_t kMaxStringLength; |
| + static const size_t kMaxStringLength = 1024; |
|
pasko
2016/08/26 13:40:30
I would recommend constexpr. The idea of including
Benoit L
2016/08/29 13:11:39
Done.
|
| private: |
| friend class PredictorDatabaseInternal; |
| @@ -146,7 +140,7 @@ class ResourcePrefetchPredictorTables : public PredictorTableBase { |
| // Returns true if the strings in the |data| are less than |kMaxStringLength| |
| // in length. |
| - bool StringsAreSmallerThanDBLimit(const PrefetchData& data) const; |
| + static bool StringsAreSmallerThanDBLimit(const PrefetchData& data); |
| // PredictorTableBase methods. |
| void CreateTableIfNonExistent() override; |