| 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 <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "chrome/browser/history/download_database.h" | 8 #include "chrome/browser/history/download_database.h" |
| 9 | 9 |
| 10 #include "chrome/browser/download/download_manager.h" | 10 #include "chrome/browser/download/download_manager.h" |
| 11 #include "chrome/browser/history/download_types.h" | 11 #include "chrome/browser/history/download_types.h" |
| 12 #include "chrome/common/sqlite_utils.h" | 12 #include "chrome/common/sqlite_utils.h" |
| 13 #include "chrome/common/sqlite_compiled_statement.h" | 13 #include "chrome/common/sqlite_compiled_statement.h" |
| 14 | 14 |
| 15 using base::Time; |
| 16 |
| 15 // Download schema: | 17 // Download schema: |
| 16 // | 18 // |
| 17 // id SQLite-generated primary key. | 19 // id SQLite-generated primary key. |
| 18 // full_path Location of the download on disk. | 20 // full_path Location of the download on disk. |
| 19 // url URL of the downloaded file. | 21 // url URL of the downloaded file. |
| 20 // start_time When the download was started. | 22 // start_time When the download was started. |
| 21 // received_bytes Total size downloaded. | 23 // received_bytes Total size downloaded. |
| 22 // total_bytes Total size of the download. | 24 // total_bytes Total size of the download. |
| 23 // state Identifies if this download is completed or not. Not used | 25 // state Identifies if this download is completed or not. Not used |
| 24 // directly by the history system. See DownloadItem's | 26 // directly by the history system. See DownloadItem's |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 text.append(search_text); | 170 text.append(search_text); |
| 169 text.append(L"%"); | 171 text.append(L"%"); |
| 170 statement->bind_wstring(0, text); | 172 statement->bind_wstring(0, text); |
| 171 statement->bind_wstring(1, text); | 173 statement->bind_wstring(1, text); |
| 172 | 174 |
| 173 while (statement->step() == SQLITE_ROW) | 175 while (statement->step() == SQLITE_ROW) |
| 174 results->push_back(statement->column_int64(0)); | 176 results->push_back(statement->column_int64(0)); |
| 175 } | 177 } |
| 176 | 178 |
| 177 } // namespace history | 179 } // namespace history |
| 178 | |
| OLD | NEW |