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

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

Issue 336633004: Code cleanup in HistoryService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 5 months 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
« no previous file with comments | « chrome/browser/history/history_service.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 831
832 HistoryService::Handle HistoryService::GetVisibleVisitCountToHost( 832 HistoryService::Handle HistoryService::GetVisibleVisitCountToHost(
833 const GURL& url, 833 const GURL& url,
834 CancelableRequestConsumerBase* consumer, 834 CancelableRequestConsumerBase* consumer,
835 const GetVisibleVisitCountToHostCallback& callback) { 835 const GetVisibleVisitCountToHostCallback& callback) {
836 DCHECK(thread_checker_.CalledOnValidThread()); 836 DCHECK(thread_checker_.CalledOnValidThread());
837 return Schedule(PRIORITY_UI, &HistoryBackend::GetVisibleVisitCountToHost, 837 return Schedule(PRIORITY_UI, &HistoryBackend::GetVisibleVisitCountToHost,
838 consumer, new history::GetVisibleVisitCountToHostRequest(callback), url); 838 consumer, new history::GetVisibleVisitCountToHostRequest(callback), url);
839 } 839 }
840 840
841 HistoryService::Handle HistoryService::QueryTopURLsAndRedirects(
842 int result_count,
843 CancelableRequestConsumerBase* consumer,
844 const QueryTopURLsAndRedirectsCallback& callback) {
845 DCHECK(thread_checker_.CalledOnValidThread());
846 return Schedule(PRIORITY_NORMAL, &HistoryBackend::QueryTopURLsAndRedirects,
847 consumer, new history::QueryTopURLsAndRedirectsRequest(callback),
848 result_count);
849 }
850
851 HistoryService::Handle HistoryService::QueryMostVisitedURLs( 841 HistoryService::Handle HistoryService::QueryMostVisitedURLs(
852 int result_count, 842 int result_count,
853 int days_back, 843 int days_back,
854 CancelableRequestConsumerBase* consumer, 844 CancelableRequestConsumerBase* consumer,
855 const QueryMostVisitedURLsCallback& callback) { 845 const QueryMostVisitedURLsCallback& callback) {
856 DCHECK(thread_checker_.CalledOnValidThread()); 846 DCHECK(thread_checker_.CalledOnValidThread());
857 return Schedule(PRIORITY_NORMAL, &HistoryBackend::QueryMostVisitedURLs, 847 return Schedule(PRIORITY_NORMAL, &HistoryBackend::QueryMostVisitedURLs,
858 consumer, 848 consumer,
859 new history::QueryMostVisitedURLsRequest(callback), 849 new history::QueryMostVisitedURLsRequest(callback),
860 result_count, days_back); 850 result_count, days_back);
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 DCHECK(thread_checker_.CalledOnValidThread()); 1184 DCHECK(thread_checker_.CalledOnValidThread());
1195 visit_database_observers_.RemoveObserver(observer); 1185 visit_database_observers_.RemoveObserver(observer);
1196 } 1186 }
1197 1187
1198 void HistoryService::NotifyVisitDBObserversOnAddVisit( 1188 void HistoryService::NotifyVisitDBObserversOnAddVisit(
1199 const history::BriefVisitInfo& info) { 1189 const history::BriefVisitInfo& info) {
1200 DCHECK(thread_checker_.CalledOnValidThread()); 1190 DCHECK(thread_checker_.CalledOnValidThread());
1201 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, 1191 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_,
1202 OnAddVisit(info)); 1192 OnAddVisit(info));
1203 } 1193 }
OLDNEW
« no previous file with comments | « chrome/browser/history/history_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698