OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // create statement. These are the 0-based indices (as strings) of the | 51 // create statement. These are the 0-based indices (as strings) of the |
52 // corresponding columns. | 52 // corresponding columns. |
53 const char kTitleColumnIndex[] = "1"; | 53 const char kTitleColumnIndex[] = "1"; |
54 const char kBodyColumnIndex[] = "2"; | 54 const char kBodyColumnIndex[] = "2"; |
55 | 55 |
56 // The string prepended to the database identifier to generate the filename. | 56 // The string prepended to the database identifier to generate the filename. |
57 const FilePath::CharType kFilePrefix[] = FILE_PATH_LITERAL("History Index "); | 57 const FilePath::CharType kFilePrefix[] = FILE_PATH_LITERAL("History Index "); |
58 | 58 |
59 } // namespace | 59 } // namespace |
60 | 60 |
| 61 TextDatabase::Match::Match() {} |
| 62 |
| 63 TextDatabase::Match::~Match() {} |
| 64 |
61 TextDatabase::TextDatabase(const FilePath& path, | 65 TextDatabase::TextDatabase(const FilePath& path, |
62 DBIdent id, | 66 DBIdent id, |
63 bool allow_create) | 67 bool allow_create) |
64 : path_(path), | 68 : path_(path), |
65 ident_(id), | 69 ident_(id), |
66 allow_create_(allow_create) { | 70 allow_create_(allow_create) { |
67 // Compute the file name. | 71 // Compute the file name. |
68 file_name_ = path_.Append(IDToFileName(ident_)); | 72 file_name_ = path_.Append(IDToFileName(ident_)); |
69 } | 73 } |
70 | 74 |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 } else { | 374 } else { |
371 // Since we got the results in order, we know the last item is the last | 375 // Since we got the results in order, we know the last item is the last |
372 // time we considered. | 376 // time we considered. |
373 *first_time_searched = results->back().time; | 377 *first_time_searched = results->back().time; |
374 } | 378 } |
375 | 379 |
376 statement.Reset(); | 380 statement.Reset(); |
377 } | 381 } |
378 | 382 |
379 } // namespace history | 383 } // namespace history |
OLD | NEW |