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 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 // Clean up entries that has been corrupted (because of the crash, for example). | 1143 // Clean up entries that has been corrupted (because of the crash, for example). |
1144 void HistoryBackend::CleanUpInProgressEntries() { | 1144 void HistoryBackend::CleanUpInProgressEntries() { |
1145 if (db_.get()) { | 1145 if (db_.get()) { |
1146 // If some "in progress" entries were not updated when Chrome exited, they | 1146 // If some "in progress" entries were not updated when Chrome exited, they |
1147 // need to be cleaned up. | 1147 // need to be cleaned up. |
1148 db_->CleanUpInProgressEntries(); | 1148 db_->CleanUpInProgressEntries(); |
1149 } | 1149 } |
1150 } | 1150 } |
1151 | 1151 |
1152 // Update a particular download entry. | 1152 // Update a particular download entry. |
1153 void HistoryBackend::UpdateDownload(int64 received_bytes, | 1153 void HistoryBackend::UpdateDownload(const DownloadPersistentStoreInfo& data) { |
1154 int32 state, | |
1155 int64 db_handle) { | |
1156 if (db_.get()) | 1154 if (db_.get()) |
1157 db_->UpdateDownload(received_bytes, state, db_handle); | 1155 db_->UpdateDownload(data); |
1158 } | 1156 } |
1159 | 1157 |
1160 // Update the path of a particular download entry. | 1158 // Update the path of a particular download entry. |
1161 void HistoryBackend::UpdateDownloadPath(const FilePath& path, | 1159 void HistoryBackend::UpdateDownloadPath(const FilePath& path, |
1162 int64 db_handle) { | 1160 int64 db_handle) { |
1163 if (db_.get()) | 1161 if (db_.get()) |
1164 db_->UpdateDownloadPath(path, db_handle); | 1162 db_->UpdateDownloadPath(path, db_handle); |
1165 } | 1163 } |
1166 | 1164 |
1167 // Create a new download entry and pass back the db_handle to it. | 1165 // Create a new download entry and pass back the db_handle to it. |
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2292 break; | 2290 break; |
2293 } | 2291 } |
2294 } | 2292 } |
2295 } | 2293 } |
2296 UMA_HISTOGRAM_TIMES("History.GetFavIconFromDB", // historical name | 2294 UMA_HISTOGRAM_TIMES("History.GetFavIconFromDB", // historical name |
2297 TimeTicks::Now() - beginning_time); | 2295 TimeTicks::Now() - beginning_time); |
2298 return success; | 2296 return success; |
2299 } | 2297 } |
2300 | 2298 |
2301 } // namespace history | 2299 } // namespace history |
OLD | NEW |