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

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

Issue 888983003: Remove last dependency of HistoryService on //content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@visitedlink
Patch Set: Rebase Created 5 years, 10 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 | « 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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 DCHECK(thread_) << "History service being called after cleanup"; 734 DCHECK(thread_) << "History service being called after cleanup";
735 DCHECK(thread_checker_.CalledOnValidThread()); 735 DCHECK(thread_checker_.CalledOnValidThread());
736 PostTaskAndReplyWithResult( 736 PostTaskAndReplyWithResult(
737 thread_->message_loop_proxy().get(), 737 thread_->message_loop_proxy().get(),
738 FROM_HERE, 738 FROM_HERE,
739 base::Bind( 739 base::Bind(
740 &HistoryBackend::CreateDownload, history_backend_.get(), create_info), 740 &HistoryBackend::CreateDownload, history_backend_.get(), create_info),
741 callback); 741 callback);
742 } 742 }
743 743
744 void HistoryService::GetNextDownloadId( 744 void HistoryService::GetNextDownloadId(const DownloadIdCallback& callback) {
745 const content::DownloadIdCallback& callback) {
746 DCHECK(thread_) << "History service being called after cleanup"; 745 DCHECK(thread_) << "History service being called after cleanup";
747 DCHECK(thread_checker_.CalledOnValidThread()); 746 DCHECK(thread_checker_.CalledOnValidThread());
748 PostTaskAndReplyWithResult( 747 PostTaskAndReplyWithResult(
749 thread_->message_loop_proxy().get(), 748 thread_->message_loop_proxy().get(),
750 FROM_HERE, 749 FROM_HERE,
751 base::Bind(&HistoryBackend::GetNextDownloadId, history_backend_.get()), 750 base::Bind(&HistoryBackend::GetNextDownloadId, history_backend_.get()),
752 callback); 751 callback);
753 } 752 }
754 753
755 // Handle queries for a list of all downloads in the history database's 754 // Handle queries for a list of all downloads in the history database's
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 const HistoryService::OnFaviconChangedCallback& callback) { 1292 const HistoryService::OnFaviconChangedCallback& callback) {
1294 DCHECK(thread_checker_.CalledOnValidThread()); 1293 DCHECK(thread_checker_.CalledOnValidThread());
1295 return favicon_changed_callback_list_.Add(callback); 1294 return favicon_changed_callback_list_.Add(callback);
1296 } 1295 }
1297 1296
1298 void HistoryService::NotifyFaviconChanged( 1297 void HistoryService::NotifyFaviconChanged(
1299 const std::set<GURL>& changed_favicons) { 1298 const std::set<GURL>& changed_favicons) {
1300 DCHECK(thread_checker_.CalledOnValidThread()); 1299 DCHECK(thread_checker_.CalledOnValidThread());
1301 favicon_changed_callback_list_.Notify(changed_favicons); 1300 favicon_changed_callback_list_.Notify(changed_favicons);
1302 } 1301 }
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