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

Side by Side Diff: chrome/browser/predictors/resource_prefetch_predictor_tables.h

Issue 2755093002: predictors: Mark before_first_contentful_paint for resources fetched before fcp. (Closed)
Patch Set: Mark before_first_contentful_paint. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_ 5 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_
6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_ 6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_
7 7
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 enum class TableOperationType { INSERT, REMOVE }; 117 enum class TableOperationType { INSERT, REMOVE };
118 118
119 friend class PredictorDatabaseInternal; 119 friend class PredictorDatabaseInternal;
120 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTablesTest, 120 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTablesTest,
121 DatabaseVersionIsSet); 121 DatabaseVersionIsSet);
122 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTablesTest, 122 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTablesTest,
123 DatabaseIsResetWhenIncompatible); 123 DatabaseIsResetWhenIncompatible);
124 124
125 // Database version. Always increment it when any change is made to the data 125 // Database version. Always increment it when any change is made to the data
126 // schema (including the .proto). 126 // schema (including the .proto).
127 static constexpr int kDatabaseVersion = 6; 127 static constexpr int kDatabaseVersion = 8;
alexilin 2017/03/27 15:32:00 nit: Why 8 after 6? :)
trevordixon 2017/03/28 11:10:41 Forgot I already updated that!
128 128
129 // Helper functions below help perform functions on the Url and host table 129 // Helper functions below help perform functions on the Url and host table
130 // using the same code. 130 // using the same code.
131 void GetAllResourceDataHelper(PrefetchKeyType key_type, 131 void GetAllResourceDataHelper(PrefetchKeyType key_type,
132 PrefetchDataMap* data_map); 132 PrefetchDataMap* data_map);
133 void GetAllRedirectDataHelper(PrefetchKeyType key_type, 133 void GetAllRedirectDataHelper(PrefetchKeyType key_type,
134 RedirectDataMap* redirect_map); 134 RedirectDataMap* redirect_map);
135 void GetAllManifestDataHelper(ManifestDataMap* manifest_map); 135 void GetAllManifestDataHelper(ManifestDataMap* manifest_map);
136 136
137 bool UpdateDataHelper(PrefetchKeyType key_type, 137 bool UpdateDataHelper(PrefetchKeyType key_type,
(...skipping 20 matching lines...) Expand all
158 158
159 static const char* GetTableName(PrefetchKeyType key_type, 159 static const char* GetTableName(PrefetchKeyType key_type,
160 PrefetchDataType data_type); 160 PrefetchDataType data_type);
161 161
162 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictorTables); 162 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictorTables);
163 }; 163 };
164 164
165 } // namespace predictors 165 } // namespace predictors
166 166
167 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_ 167 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698