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

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: Just check db. Created 3 years, 7 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 enum class TableOperationType { INSERT, REMOVE }; 136 enum class TableOperationType { INSERT, REMOVE };
137 137
138 friend class PredictorDatabaseInternal; 138 friend class PredictorDatabaseInternal;
139 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTablesTest, 139 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTablesTest,
140 DatabaseVersionIsSet); 140 DatabaseVersionIsSet);
141 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTablesTest, 141 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTablesTest,
142 DatabaseIsResetWhenIncompatible); 142 DatabaseIsResetWhenIncompatible);
143 143
144 // Database version. Always increment it when any change is made to the data 144 // Database version. Always increment it when any change is made to the data
145 // schema (including the .proto). 145 // schema (including the .proto).
146 static constexpr int kDatabaseVersion = 7; 146 static constexpr int kDatabaseVersion = 8;
Benoit L 2017/04/28 11:19:19 Note that this needs to be increased further, as A
trevordixon 2017/04/28 12:46:42 Thanks. FYI, rebasing did surface the conflict.
147 147
148 // Helper functions below help perform functions on the Url and host table 148 // Helper functions below help perform functions on the Url and host table
149 // using the same code. 149 // using the same code.
150 void GetAllResourceDataHelper(PrefetchKeyType key_type, 150 void GetAllResourceDataHelper(PrefetchKeyType key_type,
151 PrefetchDataMap* data_map); 151 PrefetchDataMap* data_map);
152 void GetAllRedirectDataHelper(PrefetchKeyType key_type, 152 void GetAllRedirectDataHelper(PrefetchKeyType key_type,
153 RedirectDataMap* redirect_map); 153 RedirectDataMap* redirect_map);
154 void GetAllManifestDataHelper(ManifestDataMap* manifest_map); 154 void GetAllManifestDataHelper(ManifestDataMap* manifest_map);
155 void GetAllOriginDataHelper(OriginDataMap* manifest_map); 155 void GetAllOriginDataHelper(OriginDataMap* manifest_map);
156 156
(...skipping 21 matching lines...) Expand all
178 178
179 static const char* GetTableName(PrefetchKeyType key_type, 179 static const char* GetTableName(PrefetchKeyType key_type,
180 PrefetchDataType data_type); 180 PrefetchDataType data_type);
181 181
182 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictorTables); 182 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictorTables);
183 }; 183 };
184 184
185 } // namespace predictors 185 } // namespace predictors
186 186
187 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_ 187 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698