| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include <limits> | 5 #include <limits> |
| 6 #include <set> | 6 #include <set> |
| 7 | 7 |
| 8 #include "chrome/browser/history/text_database.h" | 8 #include "chrome/browser/history/text_database.h" |
| 9 | 9 |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // body Body of the page. | 25 // body Body of the page. |
| 26 // | 26 // |
| 27 // "info" regular table: | 27 // "info" regular table: |
| 28 // time Time the corresponding FTS entry was visited. | 28 // time Time the corresponding FTS entry was visited. |
| 29 // | 29 // |
| 30 // We do joins across these two tables by using their internal rowids, which we | 30 // We do joins across these two tables by using their internal rowids, which we |
| 31 // keep in sync between the two tables. The internal rowid is the only part of | 31 // keep in sync between the two tables. The internal rowid is the only part of |
| 32 // an FTS table that is indexed like a normal table, and the index over it is | 32 // an FTS table that is indexed like a normal table, and the index over it is |
| 33 // free since sqlite always indexes the internal rowid. | 33 // free since sqlite always indexes the internal rowid. |
| 34 | 34 |
| 35 using base::Time; |
| 36 |
| 35 namespace history { | 37 namespace history { |
| 36 | 38 |
| 37 namespace { | 39 namespace { |
| 38 | 40 |
| 39 const int kCurrentVersionNumber = 1; | 41 const int kCurrentVersionNumber = 1; |
| 40 | 42 |
| 41 // Snippet computation relies on the index of the columns in the original | 43 // Snippet computation relies on the index of the columns in the original |
| 42 // create statement. These are the 0-based indices (as strings) of the | 44 // create statement. These are the 0-based indices (as strings) of the |
| 43 // corresponding columns. | 45 // corresponding columns. |
| 44 const char kTitleColumnIndex[] = "1"; | 46 const char kTitleColumnIndex[] = "1"; |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 // Since we got the results in order, we know the last item is the last | 383 // Since we got the results in order, we know the last item is the last |
| 382 // time we considered. | 384 // time we considered. |
| 383 *first_time_searched = results->back().time; | 385 *first_time_searched = results->back().time; |
| 384 } | 386 } |
| 385 | 387 |
| 386 statement->reset(); | 388 statement->reset(); |
| 387 } | 389 } |
| 388 | 390 |
| 389 } // namespace history | 391 } // namespace history |
| 390 | 392 |
| OLD | NEW |