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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 // isn't. Therefore, we update the delete URLs after the fact. | 680 // isn't. Therefore, we update the delete URLs after the fact. |
681 if (!profile_) | 681 if (!profile_) |
682 return; // No profile, probably unit testing. | 682 return; // No profile, probably unit testing. |
683 content::Details<history::URLsDeletedDetails> deleted_details(details); | 683 content::Details<history::URLsDeletedDetails> deleted_details(details); |
684 VisitedLinkMaster* visited_links = profile_->GetVisitedLinkMaster(); | 684 VisitedLinkMaster* visited_links = profile_->GetVisitedLinkMaster(); |
685 if (!visited_links) | 685 if (!visited_links) |
686 return; // Nobody to update. | 686 return; // Nobody to update. |
687 if (deleted_details->all_history) | 687 if (deleted_details->all_history) |
688 visited_links->DeleteAllURLs(); | 688 visited_links->DeleteAllURLs(); |
689 else // Delete individual ones. | 689 else // Delete individual ones. |
690 visited_links->DeleteURLs(deleted_details->urls); | 690 visited_links->DeleteURLs(deleted_details->rows); |
691 break; | 691 break; |
692 } | 692 } |
693 | 693 |
694 case chrome::NOTIFICATION_TEMPLATE_URL_REMOVED: | 694 case chrome::NOTIFICATION_TEMPLATE_URL_REMOVED: |
695 DeleteAllSearchTermsForKeyword( | 695 DeleteAllSearchTermsForKeyword( |
696 *(content::Details<TemplateURLID>(details).ptr())); | 696 *(content::Details<TemplateURLID>(details).ptr())); |
697 break; | 697 break; |
698 | 698 |
699 default: | 699 default: |
700 NOTREACHED(); | 700 NOTREACHED(); |
(...skipping 184 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 |