OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 |
11 // ----------- -------------- | 11 // ----------- -------------- |
12 // HistoryService <----------------> HistoryBackend | 12 // HistoryService <----------------> HistoryBackend |
13 // -> HistoryDatabase | 13 // -> HistoryDatabase |
14 // -> SQLite connection to History | 14 // -> SQLite connection to History |
15 // -> ArchivedDatabase | 15 // -> ArchivedDatabase |
16 // -> SQLite connection to Archived History | 16 // -> SQLite connection to Archived History |
17 // -> TextDatabaseManager | 17 // -> TextDatabaseManager |
18 // -> SQLite connection to one month's data | 18 // -> SQLite connection to one month's data |
19 // -> SQLite connection to one month's data | 19 // -> SQLite connection to one month's data |
20 // ... | 20 // ... |
21 // -> ThumbnailDatabase | 21 // -> ThumbnailDatabase |
22 // -> SQLite connection to Thumbnails | 22 // -> SQLite connection to Thumbnails |
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 "app/l10n_util.h" | |
28 #include "base/callback.h" | 27 #include "base/callback.h" |
29 #include "base/message_loop.h" | 28 #include "base/message_loop.h" |
30 #include "base/path_service.h" | 29 #include "base/path_service.h" |
31 #include "base/ref_counted.h" | 30 #include "base/ref_counted.h" |
| 31 #include "base/string_util.h" |
32 #include "base/task.h" | 32 #include "base/task.h" |
33 #include "chrome/browser/autocomplete/history_url_provider.h" | 33 #include "chrome/browser/autocomplete/history_url_provider.h" |
34 #include "chrome/browser/browser_list.h" | 34 #include "chrome/browser/browser_list.h" |
35 #include "chrome/browser/browser_process.h" | 35 #include "chrome/browser/browser_process.h" |
36 #include "chrome/browser/browser_window.h" | 36 #include "chrome/browser/browser_window.h" |
37 #include "chrome/browser/chrome_thread.h" | 37 #include "chrome/browser/chrome_thread.h" |
38 #include "chrome/browser/history/download_types.h" | 38 #include "chrome/browser/history/download_types.h" |
39 #include "chrome/browser/history/history_backend.h" | 39 #include "chrome/browser/history/history_backend.h" |
40 #include "chrome/browser/history/history_notifications.h" | 40 #include "chrome/browser/history/history_notifications.h" |
41 #include "chrome/browser/history/history_types.h" | 41 #include "chrome/browser/history/history_types.h" |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 | 753 |
754 void HistoryService::StartTopSitesMigration() { | 754 void HistoryService::StartTopSitesMigration() { |
755 history::TopSites* ts = profile_->GetTopSites(); | 755 history::TopSites* ts = profile_->GetTopSites(); |
756 ts->StartMigration(); | 756 ts->StartMigration(); |
757 } | 757 } |
758 | 758 |
759 void HistoryService::OnTopSitesReady() { | 759 void HistoryService::OnTopSitesReady() { |
760 ScheduleAndForget(PRIORITY_NORMAL, | 760 ScheduleAndForget(PRIORITY_NORMAL, |
761 &HistoryBackend::MigrateThumbnailsDatabase); | 761 &HistoryBackend::MigrateThumbnailsDatabase); |
762 } | 762 } |
OLD | NEW |