OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 7 #include <algorithm> |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1291 } | 1291 } |
1292 | 1292 |
1293 // Update a particular download entry. | 1293 // Update a particular download entry. |
1294 void HistoryBackend::UpdateDownload( | 1294 void HistoryBackend::UpdateDownload( |
1295 const content::DownloadPersistentStoreInfo& data) { | 1295 const content::DownloadPersistentStoreInfo& data) { |
1296 if (db_.get()) | 1296 if (db_.get()) |
1297 db_->UpdateDownload(data); | 1297 db_->UpdateDownload(data); |
1298 } | 1298 } |
1299 | 1299 |
1300 // Update the path of a particular download entry. | 1300 // Update the path of a particular download entry. |
1301 void HistoryBackend::UpdateDownloadPath(const FilePath& path, | 1301 void HistoryBackend::UpdateDownloadPath(const FilePath& target_path, |
| 1302 const FilePath& current_path, |
1302 int64 db_handle) { | 1303 int64 db_handle) { |
1303 if (db_.get()) | 1304 if (db_.get()) |
1304 db_->UpdateDownloadPath(path, db_handle); | 1305 db_->UpdateDownloadPath(target_path, current_path, db_handle); |
1305 } | 1306 } |
1306 | 1307 |
1307 // Create a new download entry and pass back the db_handle to it. | 1308 // Create a new download entry and pass back the db_handle to it. |
1308 void HistoryBackend::CreateDownload( | 1309 void HistoryBackend::CreateDownload( |
1309 scoped_refptr<DownloadCreateRequest> request, | 1310 scoped_refptr<DownloadCreateRequest> request, |
1310 int32 id, | 1311 int32 id, |
1311 const content::DownloadPersistentStoreInfo& history_info) { | 1312 const content::DownloadPersistentStoreInfo& history_info) { |
1312 int64 db_handle = 0; | 1313 int64 db_handle = 0; |
1313 if (!request->canceled()) { | 1314 if (!request->canceled()) { |
1314 if (db_.get()) | 1315 if (db_.get()) |
(...skipping 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2926 info.url_id = visit.url_id; | 2927 info.url_id = visit.url_id; |
2927 info.time = visit.visit_time; | 2928 info.time = visit.visit_time; |
2928 info.transition = visit.transition; | 2929 info.transition = visit.transition; |
2929 // If we don't have a delegate yet during setup or shutdown, we will drop | 2930 // If we don't have a delegate yet during setup or shutdown, we will drop |
2930 // these notifications. | 2931 // these notifications. |
2931 if (delegate_.get()) | 2932 if (delegate_.get()) |
2932 delegate_->NotifyVisitDBObserversOnAddVisit(info); | 2933 delegate_->NotifyVisitDBObserversOnAddVisit(info); |
2933 } | 2934 } |
2934 | 2935 |
2935 } // namespace history | 2936 } // namespace history |
OLD | NEW |