OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "chrome/browser/history/text_database.h" | 9 #include "chrome/browser/history/text_database.h" |
10 | 10 |
11 #include "app/sql/statement.h" | |
12 #include "app/sql/transaction.h" | |
13 #include "base/file_util.h" | 11 #include "base/file_util.h" |
14 #include "base/logging.h" | 12 #include "base/logging.h" |
15 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "base/string_number_conversions.h" |
16 #include "base/stringprintf.h" | 15 #include "base/stringprintf.h" |
17 #include "base/string_number_conversions.h" | |
18 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
19 #include "chrome/browser/diagnostics/sqlite_diagnostics.h" | 17 #include "chrome/browser/diagnostics/sqlite_diagnostics.h" |
| 18 #include "sql/statement.h" |
| 19 #include "sql/transaction.h" |
20 | 20 |
21 // There are two tables in each database, one full-text search (FTS) table which | 21 // There are two tables in each database, one full-text search (FTS) table which |
22 // indexes the contents and title of the pages. The other is a regular SQLITE | 22 // indexes the contents and title of the pages. The other is a regular SQLITE |
23 // table which contains non-indexed information about the page. All columns of | 23 // table which contains non-indexed information about the page. All columns of |
24 // a FTS table are indexed using the text search algorithm, which isn't what we | 24 // a FTS table are indexed using the text search algorithm, which isn't what we |
25 // want for things like times. If this were in the FTS table, there would be | 25 // want for things like times. If this were in the FTS table, there would be |
26 // different words in the index for each time number. | 26 // different words in the index for each time number. |
27 // | 27 // |
28 // "pages" FTS table: | 28 // "pages" FTS table: |
29 // url URL of the page so searches will match the URL. | 29 // url URL of the page so searches will match the URL. |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 } else { | 375 } else { |
376 // Since we got the results in order, we know the last item is the last | 376 // Since we got the results in order, we know the last item is the last |
377 // time we considered. | 377 // time we considered. |
378 *first_time_searched = results->back().time; | 378 *first_time_searched = results->back().time; |
379 } | 379 } |
380 | 380 |
381 statement.Reset(); | 381 statement.Reset(); |
382 } | 382 } |
383 | 383 |
384 } // namespace history | 384 } // namespace history |
OLD | NEW |