| 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 | 312 |
| 313 void HistoryService::SetOnBackendDestroyTask(Task* task) { | 313 void HistoryService::SetOnBackendDestroyTask(Task* 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 PageTransition::Type transition, | 322 content::PageTransition transition, |
| 323 const history::RedirectList& redirects, | 323 const history::RedirectList& redirects, |
| 324 history::VisitSource visit_source, | 324 history::VisitSource visit_source, |
| 325 bool did_replace_entry) { | 325 bool did_replace_entry) { |
| 326 AddPage(url, Time::Now(), id_scope, page_id, referrer, transition, redirects, | 326 AddPage(url, Time::Now(), id_scope, page_id, referrer, transition, redirects, |
| 327 visit_source, did_replace_entry); | 327 visit_source, did_replace_entry); |
| 328 } | 328 } |
| 329 | 329 |
| 330 void HistoryService::AddPage(const GURL& url, | 330 void HistoryService::AddPage(const GURL& url, |
| 331 Time time, | 331 Time time, |
| 332 const void* id_scope, | 332 const void* id_scope, |
| 333 int32 page_id, | 333 int32 page_id, |
| 334 const GURL& referrer, | 334 const GURL& referrer, |
| 335 PageTransition::Type transition, | 335 content::PageTransition transition, |
| 336 const history::RedirectList& redirects, | 336 const history::RedirectList& redirects, |
| 337 history::VisitSource visit_source, | 337 history::VisitSource visit_source, |
| 338 bool did_replace_entry) { | 338 bool did_replace_entry) { |
| 339 scoped_refptr<history::HistoryAddPageArgs> request( | 339 scoped_refptr<history::HistoryAddPageArgs> request( |
| 340 new history::HistoryAddPageArgs(url, time, id_scope, page_id, referrer, | 340 new history::HistoryAddPageArgs(url, time, id_scope, page_id, referrer, |
| 341 redirects, transition, visit_source, | 341 redirects, transition, visit_source, |
| 342 did_replace_entry)); | 342 did_replace_entry)); |
| 343 AddPage(*request); | 343 AddPage(*request); |
| 344 } | 344 } |
| 345 | 345 |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 846 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); | 846 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); |
| 847 if (ts) | 847 if (ts) |
| 848 ts->MigrateFromHistory(); | 848 ts->MigrateFromHistory(); |
| 849 } | 849 } |
| 850 } | 850 } |
| 851 | 851 |
| 852 void HistoryService::OnTopSitesReady() { | 852 void HistoryService::OnTopSitesReady() { |
| 853 ScheduleAndForget(PRIORITY_NORMAL, | 853 ScheduleAndForget(PRIORITY_NORMAL, |
| 854 &HistoryBackend::MigrateThumbnailsDatabase); | 854 &HistoryBackend::MigrateThumbnailsDatabase); |
| 855 } | 855 } |
| OLD | NEW |