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 "chrome/browser/history/history_backend.h" | 5 #include "chrome/browser/history/history_backend.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1110 // Clean up entries that has been corrupted (because of the crash, for example). | 1110 // Clean up entries that has been corrupted (because of the crash, for example). |
1111 void HistoryBackend::CleanUpInProgressEntries() { | 1111 void HistoryBackend::CleanUpInProgressEntries() { |
1112 if (db_.get()) { | 1112 if (db_.get()) { |
1113 // If some "in progress" entries were not updated when Chrome exited, they | 1113 // If some "in progress" entries were not updated when Chrome exited, they |
1114 // need to be cleaned up. | 1114 // need to be cleaned up. |
1115 db_->CleanUpInProgressEntries(); | 1115 db_->CleanUpInProgressEntries(); |
1116 } | 1116 } |
1117 } | 1117 } |
1118 | 1118 |
1119 // Update a particular download entry. | 1119 // Update a particular download entry. |
1120 void HistoryBackend::UpdateDownload(int64 received_bytes, | 1120 void HistoryBackend::UpdateDownload(const DownloadPersistentStoreInfo& data) { |
1121 int32 state, | |
1122 int64 db_handle) { | |
1123 if (db_.get()) | 1121 if (db_.get()) |
1124 db_->UpdateDownload(received_bytes, state, db_handle); | 1122 db_->UpdateDownload(data); |
1125 } | 1123 } |
1126 | 1124 |
1127 // Update the path of a particular download entry. | 1125 // Update the path of a particular download entry. |
1128 void HistoryBackend::UpdateDownloadPath(const FilePath& path, | 1126 void HistoryBackend::UpdateDownloadPath(const FilePath& path, |
1129 int64 db_handle) { | 1127 int64 db_handle) { |
1130 if (db_.get()) | 1128 if (db_.get()) |
1131 db_->UpdateDownloadPath(path, db_handle); | 1129 db_->UpdateDownloadPath(path, db_handle); |
1132 } | 1130 } |
1133 | 1131 |
1134 // Create a new download entry and pass back the db_handle to it. | 1132 // Create a new download entry and pass back the db_handle to it. |
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2270 break; | 2268 break; |
2271 } | 2269 } |
2272 } | 2270 } |
2273 } | 2271 } |
2274 UMA_HISTOGRAM_TIMES("History.GetFavIconFromDB", // historical name | 2272 UMA_HISTOGRAM_TIMES("History.GetFavIconFromDB", // historical name |
2275 TimeTicks::Now() - beginning_time); | 2273 TimeTicks::Now() - beginning_time); |
2276 return success; | 2274 return success; |
2277 } | 2275 } |
2278 | 2276 |
2279 } // namespace history | 2277 } // namespace history |
OLD | NEW |