OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |