| 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 COMPONENTS_HISTORY_CORE_BROWSER_URL_DATABASE_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_URL_DATABASE_H_ |
| 6 #define COMPONENTS_HISTORY_CORE_BROWSER_URL_DATABASE_H_ | 6 #define COMPONENTS_HISTORY_CORE_BROWSER_URL_DATABASE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 // index, which is faster than the reverse. | 259 // index, which is faster than the reverse. |
| 260 // | 260 // |
| 261 // is_temporary is false when generating the "regular" URLs table. The expirer | 261 // is_temporary is false when generating the "regular" URLs table. The expirer |
| 262 // sets this to true to generate the temporary table, which will have a | 262 // sets this to true to generate the temporary table, which will have a |
| 263 // different name but the same schema. | 263 // different name but the same schema. |
| 264 bool CreateURLTable(bool is_temporary); | 264 bool CreateURLTable(bool is_temporary); |
| 265 | 265 |
| 266 // Creates the index over URLs so we can quickly look up based on URL. | 266 // Creates the index over URLs so we can quickly look up based on URL. |
| 267 bool CreateMainURLIndex(); | 267 bool CreateMainURLIndex(); |
| 268 | 268 |
| 269 // Recreate URL table, and keep all existing contents. |
| 270 bool RecreateURLTableWithAllContents(); |
| 271 |
| 269 // Ensures the keyword search terms table exists. | 272 // Ensures the keyword search terms table exists. |
| 270 bool InitKeywordSearchTermsTable(); | 273 bool InitKeywordSearchTermsTable(); |
| 271 | 274 |
| 272 // Creates the indices used for keyword search terms. | 275 // Creates the indices used for keyword search terms. |
| 273 bool CreateKeywordSearchTermsIndices(); | 276 bool CreateKeywordSearchTermsIndices(); |
| 274 | 277 |
| 275 // Deletes the keyword search terms table. | 278 // Deletes the keyword search terms table. |
| 276 bool DropKeywordSearchTermsTable(); | 279 bool DropKeywordSearchTermsTable(); |
| 277 | 280 |
| 278 // Inserts the given URL row into the URLs table, using the regular table | 281 // Inserts the given URL row into the URLs table, using the regular table |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 // is_null() then this function determines a new time threshold each time it is | 329 // is_null() then this function determines a new time threshold each time it is |
| 327 // called. Since getting system time can be costly (such as for cases where | 330 // called. Since getting system time can be costly (such as for cases where |
| 328 // this function will be called in a loop over many history items), you can | 331 // this function will be called in a loop over many history items), you can |
| 329 // provide a non-null |time_cache| by simply initializing |time_cache| with | 332 // provide a non-null |time_cache| by simply initializing |time_cache| with |
| 330 // AutocompleteAgeThreshold() (or any other desired time in the past). | 333 // AutocompleteAgeThreshold() (or any other desired time in the past). |
| 331 bool RowQualifiesAsSignificant(const URLRow& row, const base::Time& threshold); | 334 bool RowQualifiesAsSignificant(const URLRow& row, const base::Time& threshold); |
| 332 | 335 |
| 333 } // namespace history | 336 } // namespace history |
| 334 | 337 |
| 335 #endif // COMPONENTS_HISTORY_CORE_BROWSER_URL_DATABASE_H_ | 338 #endif // COMPONENTS_HISTORY_CORE_BROWSER_URL_DATABASE_H_ |
| OLD | NEW |