| 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 // 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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 QueryURLCallback* callback) { | 507 QueryURLCallback* callback) { |
| 508 return Schedule(PRIORITY_UI, &HistoryBackend::QueryURL, consumer, | 508 return Schedule(PRIORITY_UI, &HistoryBackend::QueryURL, consumer, |
| 509 new history::QueryURLRequest(callback), url, want_visits); | 509 new history::QueryURLRequest(callback), url, want_visits); |
| 510 } | 510 } |
| 511 | 511 |
| 512 // Downloads ------------------------------------------------------------------- | 512 // Downloads ------------------------------------------------------------------- |
| 513 | 513 |
| 514 // Handle creation of a download by creating an entry in the history service's | 514 // Handle creation of a download by creating an entry in the history service's |
| 515 // 'downloads' table. | 515 // 'downloads' table. |
| 516 HistoryService::Handle HistoryService::CreateDownload( | 516 HistoryService::Handle HistoryService::CreateDownload( |
| 517 const DownloadCreateInfo& create_info, | 517 const DownloadHistoryInfo& create_info, |
| 518 CancelableRequestConsumerBase* consumer, | 518 CancelableRequestConsumerBase* consumer, |
| 519 HistoryService::DownloadCreateCallback* callback) { | 519 HistoryService::DownloadCreateCallback* callback) { |
| 520 return Schedule(PRIORITY_NORMAL, &HistoryBackend::CreateDownload, consumer, | 520 return Schedule(PRIORITY_NORMAL, &HistoryBackend::CreateDownload, consumer, |
| 521 new history::DownloadCreateRequest(callback), create_info); | 521 new history::DownloadCreateRequest(callback), create_info); |
| 522 } | 522 } |
| 523 | 523 |
| 524 // Handle queries for a list of all downloads in the history database's | 524 // Handle queries for a list of all downloads in the history database's |
| 525 // 'downloads' table. | 525 // 'downloads' table. |
| 526 HistoryService::Handle HistoryService::QueryDownloads( | 526 HistoryService::Handle HistoryService::QueryDownloads( |
| 527 CancelableRequestConsumerBase* consumer, | 527 CancelableRequestConsumerBase* consumer, |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); | 811 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); |
| 812 if (ts) | 812 if (ts) |
| 813 ts->MigrateFromHistory(); | 813 ts->MigrateFromHistory(); |
| 814 } | 814 } |
| 815 } | 815 } |
| 816 | 816 |
| 817 void HistoryService::OnTopSitesReady() { | 817 void HistoryService::OnTopSitesReady() { |
| 818 ScheduleAndForget(PRIORITY_NORMAL, | 818 ScheduleAndForget(PRIORITY_NORMAL, |
| 819 &HistoryBackend::MigrateThumbnailsDatabase); | 819 &HistoryBackend::MigrateThumbnailsDatabase); |
| 820 } | 820 } |
| OLD | NEW |