| OLD | NEW |
| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 const std::vector<std::string>& keys); | 145 const std::vector<std::string>& keys); |
| 146 | 146 |
| 147 // Returns true if the strings in the |data| are less than |kMaxStringLength| | 147 // Returns true if the strings in the |data| are less than |kMaxStringLength| |
| 148 // in length. | 148 // in length. |
| 149 bool StringsAreSmallerThanDBLimit(const PrefetchData& data) const; | 149 bool StringsAreSmallerThanDBLimit(const PrefetchData& data) const; |
| 150 | 150 |
| 151 // PredictorTableBase methods. | 151 // PredictorTableBase methods. |
| 152 void CreateTableIfNonExistent() override; | 152 void CreateTableIfNonExistent() override; |
| 153 void LogDatabaseStats() override; | 153 void LogDatabaseStats() override; |
| 154 | 154 |
| 155 bool DropTablesIfOutdated(sql::Connection* db); | 155 static bool DropTablesIfOutdated(sql::Connection* db); |
| 156 | 156 |
| 157 // Helpers to return Statements for cached Statements. The caller must take | 157 // Helpers to return Statements for cached Statements. The caller must take |
| 158 // ownership of the return Statements. | 158 // ownership of the return Statements. |
| 159 sql::Statement* GetUrlResourceDeleteStatement(); | 159 sql::Statement* GetUrlResourceDeleteStatement(); |
| 160 sql::Statement* GetUrlResourceUpdateStatement(); | 160 sql::Statement* GetUrlResourceUpdateStatement(); |
| 161 sql::Statement* GetUrlMetadataDeleteStatement(); | 161 sql::Statement* GetUrlMetadataDeleteStatement(); |
| 162 sql::Statement* GetUrlMetadataUpdateStatement(); | 162 sql::Statement* GetUrlMetadataUpdateStatement(); |
| 163 | 163 |
| 164 sql::Statement* GetHostResourceDeleteStatement(); | 164 sql::Statement* GetHostResourceDeleteStatement(); |
| 165 sql::Statement* GetHostResourceUpdateStatement(); | 165 sql::Statement* GetHostResourceUpdateStatement(); |
| 166 sql::Statement* GetHostMetadataDeleteStatement(); | 166 sql::Statement* GetHostMetadataDeleteStatement(); |
| 167 sql::Statement* GetHostMetadataUpdateStatement(); | 167 sql::Statement* GetHostMetadataUpdateStatement(); |
| 168 | 168 |
| 169 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictorTables); | 169 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictorTables); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 } // namespace predictors | 172 } // namespace predictors |
| 173 | 173 |
| 174 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_ | 174 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_ |
| OLD | NEW |