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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 return Schedule(PRIORITY_NORMAL, &HistoryBackend::QueryMostVisitedURLs, | 646 return Schedule(PRIORITY_NORMAL, &HistoryBackend::QueryMostVisitedURLs, |
647 consumer, | 647 consumer, |
648 new history::QueryMostVisitedURLsRequest(callback), | 648 new history::QueryMostVisitedURLsRequest(callback), |
649 result_count, days_back); | 649 result_count, days_back); |
650 } | 650 } |
651 | 651 |
652 HistoryService::Handle HistoryService::QueryFilteredURLs( | 652 HistoryService::Handle HistoryService::QueryFilteredURLs( |
653 int result_count, | 653 int result_count, |
654 const history::VisitFilter& filter, | 654 const history::VisitFilter& filter, |
655 CancelableRequestConsumerBase* consumer, | 655 CancelableRequestConsumerBase* consumer, |
656 const QueryMostVisitedURLsCallback& callback) { | 656 const QueryFilteredURLsCallback& callback) { |
657 return Schedule(PRIORITY_NORMAL, | 657 return Schedule(PRIORITY_NORMAL, |
658 &HistoryBackend::QueryFilteredURLs, | 658 &HistoryBackend::QueryFilteredURLs, |
659 consumer, | 659 consumer, |
660 new history::QueryMostVisitedURLsRequest(callback), | 660 new history::QueryFilteredURLsRequest(callback), |
661 result_count, filter); | 661 result_count, filter); |
662 } | 662 } |
663 | 663 |
664 void HistoryService::Observe(int type, | 664 void HistoryService::Observe(int type, |
665 const content::NotificationSource& source, | 665 const content::NotificationSource& source, |
666 const content::NotificationDetails& details) { | 666 const content::NotificationDetails& details) { |
667 if (!thread_) | 667 if (!thread_) |
668 return; | 668 return; |
669 | 669 |
670 switch (type) { | 670 switch (type) { |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); | 885 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); |
886 if (ts) | 886 if (ts) |
887 ts->MigrateFromHistory(); | 887 ts->MigrateFromHistory(); |
888 } | 888 } |
889 } | 889 } |
890 | 890 |
891 void HistoryService::OnTopSitesReady() { | 891 void HistoryService::OnTopSitesReady() { |
892 ScheduleAndForget(PRIORITY_NORMAL, | 892 ScheduleAndForget(PRIORITY_NORMAL, |
893 &HistoryBackend::MigrateThumbnailsDatabase); | 893 &HistoryBackend::MigrateThumbnailsDatabase); |
894 } | 894 } |
OLD | NEW |