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

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

Issue 514233002: HistoryService fixups for scoped_refptr operator T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | 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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 // Downloads ------------------------------------------------------------------- 734 // Downloads -------------------------------------------------------------------
735 735
736 // Handle creation of a download by creating an entry in the history service's 736 // Handle creation of a download by creating an entry in the history service's
737 // 'downloads' table. 737 // 'downloads' table.
738 void HistoryService::CreateDownload( 738 void HistoryService::CreateDownload(
739 const history::DownloadRow& create_info, 739 const history::DownloadRow& create_info,
740 const HistoryService::DownloadCreateCallback& callback) { 740 const HistoryService::DownloadCreateCallback& callback) {
741 DCHECK(thread_) << "History service being called after cleanup"; 741 DCHECK(thread_) << "History service being called after cleanup";
742 DCHECK(thread_checker_.CalledOnValidThread()); 742 DCHECK(thread_checker_.CalledOnValidThread());
743 PostTaskAndReplyWithResult( 743 PostTaskAndReplyWithResult(
744 thread_->message_loop_proxy(), FROM_HERE, 744 thread_->message_loop_proxy().get(),
745 base::Bind(&HistoryBackend::CreateDownload, history_backend_.get(), 745 FROM_HERE,
746 create_info), 746 base::Bind(
747 &HistoryBackend::CreateDownload, history_backend_.get(), create_info),
747 callback); 748 callback);
748 } 749 }
749 750
750 void HistoryService::GetNextDownloadId( 751 void HistoryService::GetNextDownloadId(
751 const content::DownloadIdCallback& callback) { 752 const content::DownloadIdCallback& callback) {
752 DCHECK(thread_) << "History service being called after cleanup"; 753 DCHECK(thread_) << "History service being called after cleanup";
753 DCHECK(thread_checker_.CalledOnValidThread()); 754 DCHECK(thread_checker_.CalledOnValidThread());
754 PostTaskAndReplyWithResult( 755 PostTaskAndReplyWithResult(
755 thread_->message_loop_proxy(), FROM_HERE, 756 thread_->message_loop_proxy().get(),
757 FROM_HERE,
756 base::Bind(&HistoryBackend::GetNextDownloadId, history_backend_.get()), 758 base::Bind(&HistoryBackend::GetNextDownloadId, history_backend_.get()),
757 callback); 759 callback);
758 } 760 }
759 761
760 // Handle queries for a list of all downloads in the history database's 762 // Handle queries for a list of all downloads in the history database's
761 // 'downloads' table. 763 // 'downloads' table.
762 void HistoryService::QueryDownloads( 764 void HistoryService::QueryDownloads(
763 const DownloadQueryCallback& callback) { 765 const DownloadQueryCallback& callback) {
764 DCHECK(thread_) << "History service being called after cleanup"; 766 DCHECK(thread_) << "History service being called after cleanup";
765 DCHECK(thread_checker_.CalledOnValidThread()); 767 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 DCHECK(thread_checker_.CalledOnValidThread()); 1224 DCHECK(thread_checker_.CalledOnValidThread());
1223 visit_database_observers_.RemoveObserver(observer); 1225 visit_database_observers_.RemoveObserver(observer);
1224 } 1226 }
1225 1227
1226 void HistoryService::NotifyVisitDBObserversOnAddVisit( 1228 void HistoryService::NotifyVisitDBObserversOnAddVisit(
1227 const history::BriefVisitInfo& info) { 1229 const history::BriefVisitInfo& info) {
1228 DCHECK(thread_checker_.CalledOnValidThread()); 1230 DCHECK(thread_checker_.CalledOnValidThread());
1229 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, 1231 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_,
1230 OnAddVisit(info)); 1232 OnAddVisit(info));
1231 } 1233 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698