Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: chrome/browser/history/history.cc

Issue 8890089: [Sync] Add HistoryService::DeleteURLsForTest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 ShowProfileErrorDialog( 755 ShowProfileErrorDialog(
756 (init_status == sql::INIT_FAILURE) ? 756 (init_status == sql::INIT_FAILURE) ?
757 IDS_COULDNT_OPEN_PROFILE_ERROR : IDS_PROFILE_TOO_NEW_ERROR); 757 IDS_COULDNT_OPEN_PROFILE_ERROR : IDS_PROFILE_TOO_NEW_ERROR);
758 } 758 }
759 759
760 void HistoryService::DeleteURL(const GURL& url) { 760 void HistoryService::DeleteURL(const GURL& url) {
761 // We will update the visited links when we observe the delete notifications. 761 // We will update the visited links when we observe the delete notifications.
762 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::DeleteURL, url); 762 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::DeleteURL, url);
763 } 763 }
764 764
765 void HistoryService::DeleteURLsForTest(const std::vector<GURL>& urls) {
766 // We will update the visited links when we observe the delete
767 // notifications.
768 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::DeleteURLs, urls);
769 }
770
765 void HistoryService::ExpireHistoryBetween( 771 void HistoryService::ExpireHistoryBetween(
766 const std::set<GURL>& restrict_urls, 772 const std::set<GURL>& restrict_urls,
767 Time begin_time, Time end_time, 773 Time begin_time, Time end_time,
768 CancelableRequestConsumerBase* consumer, 774 CancelableRequestConsumerBase* consumer,
769 const base::Closure& callback) { 775 const base::Closure& callback) {
770 776
771 // We will update the visited links when we observe the delete notifications. 777 // We will update the visited links when we observe the delete notifications.
772 Schedule(PRIORITY_UI, &HistoryBackend::ExpireHistoryBetween, consumer, 778 Schedule(PRIORITY_UI, &HistoryBackend::ExpireHistoryBetween, consumer,
773 new CancelableRequest<base::Closure>(callback), 779 new CancelableRequest<base::Closure>(callback),
774 restrict_urls, begin_time, end_time); 780 restrict_urls, begin_time, end_time);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); 854 history::TopSites* ts = profile_->GetTopSitesWithoutCreating();
849 if (ts) 855 if (ts)
850 ts->MigrateFromHistory(); 856 ts->MigrateFromHistory();
851 } 857 }
852 } 858 }
853 859
854 void HistoryService::OnTopSitesReady() { 860 void HistoryService::OnTopSitesReady() {
855 ScheduleAndForget(PRIORITY_NORMAL, 861 ScheduleAndForget(PRIORITY_NORMAL,
856 &HistoryBackend::MigrateThumbnailsDatabase); 862 &HistoryBackend::MigrateThumbnailsDatabase);
857 } 863 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698