OLD | NEW |
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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 | 378 |
379 ScheduleAndForget(PRIORITY_NORMAL, | 379 ScheduleAndForget(PRIORITY_NORMAL, |
380 &HistoryBackend::AddPageNoVisitForBookmark, url); | 380 &HistoryBackend::AddPageNoVisitForBookmark, url); |
381 } | 381 } |
382 | 382 |
383 void HistoryService::SetPageTitle(const GURL& url, | 383 void HistoryService::SetPageTitle(const GURL& url, |
384 const string16& title) { | 384 const string16& title) { |
385 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::SetPageTitle, url, title); | 385 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::SetPageTitle, url, title); |
386 } | 386 } |
387 | 387 |
| 388 void HistoryService::UpdatePageInfo(const void* host, |
| 389 int32 page_id, |
| 390 const GURL& url, |
| 391 const Time end_ts) { |
| 392 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::UpdatePageInfo, |
| 393 host, page_id, url, end_ts); |
| 394 } |
| 395 |
388 void HistoryService::AddPageWithDetails(const GURL& url, | 396 void HistoryService::AddPageWithDetails(const GURL& url, |
389 const string16& title, | 397 const string16& title, |
390 int visit_count, | 398 int visit_count, |
391 int typed_count, | 399 int typed_count, |
392 Time last_visit, | 400 Time last_visit, |
393 bool hidden, | 401 bool hidden, |
394 history::VisitSource visit_source) { | 402 history::VisitSource visit_source) { |
395 // Filter out unwanted URLs. | 403 // Filter out unwanted URLs. |
396 if (!CanAddURL(url)) | 404 if (!CanAddURL(url)) |
397 return; | 405 return; |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); | 879 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); |
872 if (ts) | 880 if (ts) |
873 ts->MigrateFromHistory(); | 881 ts->MigrateFromHistory(); |
874 } | 882 } |
875 } | 883 } |
876 | 884 |
877 void HistoryService::OnTopSitesReady() { | 885 void HistoryService::OnTopSitesReady() { |
878 ScheduleAndForget(PRIORITY_NORMAL, | 886 ScheduleAndForget(PRIORITY_NORMAL, |
879 &HistoryBackend::MigrateThumbnailsDatabase); | 887 &HistoryBackend::MigrateThumbnailsDatabase); |
880 } | 888 } |
OLD | NEW |