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

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

Issue 8892023: Eliminated the last few uses of MessageLoop::QuitTask in chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more... 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
« no previous file with comments | « chrome/browser/history/history.h ('k') | chrome/browser/history/history_backend.h » ('j') | 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) 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 HistoryService::Handle HistoryService::QuerySegmentUsageSince( 303 HistoryService::Handle HistoryService::QuerySegmentUsageSince(
304 CancelableRequestConsumerBase* consumer, 304 CancelableRequestConsumerBase* consumer,
305 const Time from_time, 305 const Time from_time,
306 int max_result_count, 306 int max_result_count,
307 const SegmentQueryCallback& callback) { 307 const SegmentQueryCallback& callback) {
308 return Schedule(PRIORITY_UI, &HistoryBackend::QuerySegmentUsage, 308 return Schedule(PRIORITY_UI, &HistoryBackend::QuerySegmentUsage,
309 consumer, new history::QuerySegmentUsageRequest(callback), 309 consumer, new history::QuerySegmentUsageRequest(callback),
310 from_time, max_result_count); 310 from_time, max_result_count);
311 } 311 }
312 312
313 void HistoryService::SetOnBackendDestroyTask(Task* task) { 313 void HistoryService::SetOnBackendDestroyTask(const base::Closure& task) {
314 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::SetOnBackendDestroyTask, 314 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::SetOnBackendDestroyTask,
315 MessageLoop::current(), task); 315 MessageLoop::current(), task);
316 } 316 }
317 317
318 void HistoryService::AddPage(const GURL& url, 318 void HistoryService::AddPage(const GURL& url,
319 const void* id_scope, 319 const void* id_scope,
320 int32 page_id, 320 int32 page_id,
321 const GURL& referrer, 321 const GURL& referrer,
322 content::PageTransition transition, 322 content::PageTransition transition,
323 const history::RedirectList& redirects, 323 const history::RedirectList& redirects,
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); 848 history::TopSites* ts = profile_->GetTopSitesWithoutCreating();
849 if (ts) 849 if (ts)
850 ts->MigrateFromHistory(); 850 ts->MigrateFromHistory();
851 } 851 }
852 } 852 }
853 853
854 void HistoryService::OnTopSitesReady() { 854 void HistoryService::OnTopSitesReady() {
855 ScheduleAndForget(PRIORITY_NORMAL, 855 ScheduleAndForget(PRIORITY_NORMAL,
856 &HistoryBackend::MigrateThumbnailsDatabase); 856 &HistoryBackend::MigrateThumbnailsDatabase);
857 } 857 }
OLDNEW
« no previous file with comments | « chrome/browser/history/history.h ('k') | chrome/browser/history/history_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698