| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 virtual void DeleteSingleDataPoint(const std::string& key, | 110 virtual void DeleteSingleDataPoint(const std::string& key, |
| 111 PrefetchKeyType key_type); | 111 PrefetchKeyType key_type); |
| 112 | 112 |
| 113 // Deletes all data in all the tables. | 113 // Deletes all data in all the tables. |
| 114 virtual void DeleteAllData(); | 114 virtual void DeleteAllData(); |
| 115 | 115 |
| 116 // The maximum length of the string that can be stored in the DB. | 116 // The maximum length of the string that can be stored in the DB. |
| 117 static const size_t kMaxStringLength; | 117 static const size_t kMaxStringLength; |
| 118 | 118 |
| 119 private: | 119 private: |
| 120 friend class PredictorDatabaseInternal; | 120 friend class PredictorDatabase; |
| 121 friend class MockResourcePrefetchPredictorTables; | 121 friend class MockResourcePrefetchPredictorTables; |
| 122 | 122 |
| 123 ResourcePrefetchPredictorTables(); | 123 ResourcePrefetchPredictorTables(); |
| 124 virtual ~ResourcePrefetchPredictorTables(); | 124 virtual ~ResourcePrefetchPredictorTables(); |
| 125 | 125 |
| 126 // Helper functions below help perform functions on the Url and host table | 126 // Helper functions below help perform functions on the Url and host table |
| 127 // using the same code. | 127 // using the same code. |
| 128 void GetAllDataHelper(PrefetchKeyType key_type, | 128 void GetAllDataHelper(PrefetchKeyType key_type, |
| 129 PrefetchDataMap* data_map, | 129 PrefetchDataMap* data_map, |
| 130 std::vector<std::string>* to_delete); | 130 std::vector<std::string>* to_delete); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 151 sql::Statement* GetHostResourceUpdateStatement(); | 151 sql::Statement* GetHostResourceUpdateStatement(); |
| 152 sql::Statement* GetHostMetadataDeleteStatement(); | 152 sql::Statement* GetHostMetadataDeleteStatement(); |
| 153 sql::Statement* GetHostMetadataUpdateStatement(); | 153 sql::Statement* GetHostMetadataUpdateStatement(); |
| 154 | 154 |
| 155 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictorTables); | 155 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictorTables); |
| 156 }; | 156 }; |
| 157 | 157 |
| 158 } // namespace predictors | 158 } // namespace predictors |
| 159 | 159 |
| 160 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_ | 160 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_ |
| OLD | NEW |