| 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 // The history system runs on a background thread so that potentially slow | 5 // The history system runs on a background thread so that potentially slow |
| 6 // database operations don't delay the browser. This backend processing is | 6 // database operations don't delay the browser. This backend processing is |
| 7 // represented by HistoryBackend. The HistoryService's job is to dispatch to | 7 // represented by HistoryBackend. The HistoryService's job is to dispatch to |
| 8 // that thread. | 8 // that thread. |
| 9 // | 9 // |
| 10 // Main thread History thread | 10 // Main thread History thread |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 } | 700 } |
| 701 | 701 |
| 702 // Handle updates for a particular download. This is a 'fire and forget' | 702 // Handle updates for a particular download. This is a 'fire and forget' |
| 703 // operation, so we don't need to be called back. | 703 // operation, so we don't need to be called back. |
| 704 void HistoryService::UpdateDownload( | 704 void HistoryService::UpdateDownload( |
| 705 const content::DownloadPersistentStoreInfo& data) { | 705 const content::DownloadPersistentStoreInfo& data) { |
| 706 DCHECK(thread_checker_.CalledOnValidThread()); | 706 DCHECK(thread_checker_.CalledOnValidThread()); |
| 707 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::UpdateDownload, data); | 707 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::UpdateDownload, data); |
| 708 } | 708 } |
| 709 | 709 |
| 710 void HistoryService::UpdateDownloadPath(const FilePath& path, | 710 void HistoryService::UpdateDownloadPath(const FilePath& target_path, |
| 711 const FilePath& current_path, |
| 711 int64 db_handle) { | 712 int64 db_handle) { |
| 712 DCHECK(thread_checker_.CalledOnValidThread()); | 713 DCHECK(thread_checker_.CalledOnValidThread()); |
| 713 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::UpdateDownloadPath, | 714 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::UpdateDownloadPath, |
| 714 path, db_handle); | 715 target_path, current_path, db_handle); |
| 715 } | 716 } |
| 716 | 717 |
| 717 void HistoryService::RemoveDownload(int64 db_handle) { | 718 void HistoryService::RemoveDownload(int64 db_handle) { |
| 718 DCHECK(thread_checker_.CalledOnValidThread()); | 719 DCHECK(thread_checker_.CalledOnValidThread()); |
| 719 ScheduleAndForget(PRIORITY_NORMAL, | 720 ScheduleAndForget(PRIORITY_NORMAL, |
| 720 &HistoryBackend::RemoveDownload, db_handle); | 721 &HistoryBackend::RemoveDownload, db_handle); |
| 721 } | 722 } |
| 722 | 723 |
| 723 void HistoryService::RemoveDownloadsBetween(Time remove_begin, | 724 void HistoryService::RemoveDownloadsBetween(Time remove_begin, |
| 724 Time remove_end) { | 725 Time remove_end) { |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 } | 1135 } |
| 1135 | 1136 |
| 1136 void HistoryService::ProcessDeleteDirective( | 1137 void HistoryService::ProcessDeleteDirective( |
| 1137 const sync_pb::HistoryDeleteDirectiveSpecifics& delete_directive) { | 1138 const sync_pb::HistoryDeleteDirectiveSpecifics& delete_directive) { |
| 1138 DCHECK(thread_checker_.CalledOnValidThread()); | 1139 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1139 // TODO(akalin): Actually process the delete directive. | 1140 // TODO(akalin): Actually process the delete directive. |
| 1140 // TODO(akalin): Keep track of which delete directives we've already | 1141 // TODO(akalin): Keep track of which delete directives we've already |
| 1141 // processed. | 1142 // processed. |
| 1142 NOTREACHED(); | 1143 NOTREACHED(); |
| 1143 } | 1144 } |
| OLD | NEW |