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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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
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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 const SegmentQueryCallback& callback) { 457 const SegmentQueryCallback& callback) {
458 DCHECK(thread_checker_.CalledOnValidThread()); 458 DCHECK(thread_checker_.CalledOnValidThread());
459 return Schedule(PRIORITY_UI, &HistoryBackend::QuerySegmentDuration, 459 return Schedule(PRIORITY_UI, &HistoryBackend::QuerySegmentDuration,
460 consumer, new history::QuerySegmentUsageRequest(callback), 460 consumer, new history::QuerySegmentUsageRequest(callback),
461 from_time, max_result_count); 461 from_time, max_result_count);
462 } 462 }
463 463
464 void HistoryService::SetOnBackendDestroyTask(const base::Closure& task) { 464 void HistoryService::SetOnBackendDestroyTask(const base::Closure& task) {
465 DCHECK(thread_checker_.CalledOnValidThread()); 465 DCHECK(thread_checker_.CalledOnValidThread());
466 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::SetOnBackendDestroyTask, 466 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::SetOnBackendDestroyTask,
467 MessageLoop::current(), task); 467 base::MessageLoop::current(), task);
468 } 468 }
469 469
470 void HistoryService::AddPage(const GURL& url, 470 void HistoryService::AddPage(const GURL& url,
471 Time time, 471 Time time,
472 const void* id_scope, 472 const void* id_scope,
473 int32 page_id, 473 int32 page_id,
474 const GURL& referrer, 474 const GURL& referrer,
475 const history::RedirectList& redirects, 475 const history::RedirectList& redirects,
476 content::PageTransition transition, 476 content::PageTransition transition,
477 history::VisitSource visit_source, 477 history::VisitSource visit_source,
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 DCHECK(thread_checker_.CalledOnValidThread()); 1271 DCHECK(thread_checker_.CalledOnValidThread());
1272 visit_database_observers_.RemoveObserver(observer); 1272 visit_database_observers_.RemoveObserver(observer);
1273 } 1273 }
1274 1274
1275 void HistoryService::NotifyVisitDBObserversOnAddVisit( 1275 void HistoryService::NotifyVisitDBObserversOnAddVisit(
1276 const history::BriefVisitInfo& info) { 1276 const history::BriefVisitInfo& info) {
1277 DCHECK(thread_checker_.CalledOnValidThread()); 1277 DCHECK(thread_checker_.CalledOnValidThread());
1278 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, 1278 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_,
1279 OnAddVisit(info)); 1279 OnAddVisit(info));
1280 } 1280 }
OLDNEW
« no previous file with comments | « chrome/browser/history/history_querying_unittest.cc ('k') | chrome/browser/history/history_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698