| 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 12 matching lines...) Expand all Loading... |
| 23 // (and favicons) | 23 // (and favicons) |
| 24 | 24 |
| 25 #include "chrome/browser/history/history.h" | 25 #include "chrome/browser/history/history.h" |
| 26 | 26 |
| 27 #include "base/callback.h" | 27 #include "base/callback.h" |
| 28 #include "base/memory/ref_counted.h" | 28 #include "base/memory/ref_counted.h" |
| 29 #include "base/message_loop.h" | 29 #include "base/message_loop.h" |
| 30 #include "base/path_service.h" | 30 #include "base/path_service.h" |
| 31 #include "base/string_util.h" | 31 #include "base/string_util.h" |
| 32 #include "base/task.h" | 32 #include "base/task.h" |
| 33 #include "base/threading/thread.h" |
| 33 #include "chrome/browser/autocomplete/history_url_provider.h" | 34 #include "chrome/browser/autocomplete/history_url_provider.h" |
| 34 #include "chrome/browser/browser_process.h" | 35 #include "chrome/browser/browser_process.h" |
| 35 #include "chrome/browser/history/history_backend.h" | 36 #include "chrome/browser/history/history_backend.h" |
| 36 #include "chrome/browser/history/history_notifications.h" | 37 #include "chrome/browser/history/history_notifications.h" |
| 37 #include "chrome/browser/history/history_types.h" | 38 #include "chrome/browser/history/history_types.h" |
| 38 #include "chrome/browser/history/in_memory_database.h" | 39 #include "chrome/browser/history/in_memory_database.h" |
| 39 #include "chrome/browser/history/in_memory_history_backend.h" | 40 #include "chrome/browser/history/in_memory_history_backend.h" |
| 40 #include "chrome/browser/history/top_sites.h" | 41 #include "chrome/browser/history/top_sites.h" |
| 41 #include "chrome/browser/prefs/pref_service.h" | 42 #include "chrome/browser/prefs/pref_service.h" |
| 42 #include "chrome/browser/profiles/profile.h" | 43 #include "chrome/browser/profiles/profile.h" |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); | 845 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); |
| 845 if (ts) | 846 if (ts) |
| 846 ts->MigrateFromHistory(); | 847 ts->MigrateFromHistory(); |
| 847 } | 848 } |
| 848 } | 849 } |
| 849 | 850 |
| 850 void HistoryService::OnTopSitesReady() { | 851 void HistoryService::OnTopSitesReady() { |
| 851 ScheduleAndForget(PRIORITY_NORMAL, | 852 ScheduleAndForget(PRIORITY_NORMAL, |
| 852 &HistoryBackend::MigrateThumbnailsDatabase); | 853 &HistoryBackend::MigrateThumbnailsDatabase); |
| 853 } | 854 } |
| OLD | NEW |