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 "chrome/browser/history/url_database.h" | 5 #include "chrome/browser/history/url_database.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "chrome/common/l10n_util.h" | 11 #include "chrome/common/l10n_util.h" |
12 #include "chrome/common/sqlite_utils.h" | 12 #include "chrome/common/sqlite_utils.h" |
13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
14 | 14 |
| 15 using base::Time; |
| 16 |
15 namespace history { | 17 namespace history { |
16 | 18 |
17 const char URLDatabase::kURLRowFields[] = HISTORY_URL_ROW_FIELDS; | 19 const char URLDatabase::kURLRowFields[] = HISTORY_URL_ROW_FIELDS; |
18 const int URLDatabase::kNumURLRowFields = 9; | 20 const int URLDatabase::kNumURLRowFields = 9; |
19 | 21 |
20 bool URLDatabase::URLEnumerator::GetNextURL(URLRow* r) { | 22 bool URLDatabase::URLEnumerator::GetNextURL(URLRow* r) { |
21 if (statement_.step() == SQLITE_ROW) { | 23 if (statement_.step() == SQLITE_ROW) { |
22 FillURLRow(statement_, r); | 24 FillURLRow(statement_, r); |
23 return true; | 25 return true; |
24 } | 26 } |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 } | 471 } |
470 | 472 |
471 void URLDatabase::CreateSupplimentaryURLIndices() { | 473 void URLDatabase::CreateSupplimentaryURLIndices() { |
472 // Add a favicon index. This is useful when we delete urls. | 474 // Add a favicon index. This is useful when we delete urls. |
473 sqlite3_exec(GetDB(), "CREATE INDEX urls_favicon_id_INDEX ON urls (favicon_id)
", | 475 sqlite3_exec(GetDB(), "CREATE INDEX urls_favicon_id_INDEX ON urls (favicon_id)
", |
474 NULL, NULL, NULL); | 476 NULL, NULL, NULL); |
475 } | 477 } |
476 | 478 |
477 } // namespace history | 479 } // namespace history |
478 | 480 |
OLD | NEW |