| 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 15 matching lines...) Expand all Loading... |
| 26 #include "base/compiler_specific.h" | 26 #include "base/compiler_specific.h" |
| 27 #include "base/location.h" | 27 #include "base/location.h" |
| 28 #include "base/memory/ref_counted.h" | 28 #include "base/memory/ref_counted.h" |
| 29 #include "base/message_loop/message_loop.h" | 29 #include "base/message_loop/message_loop.h" |
| 30 #include "base/path_service.h" | 30 #include "base/path_service.h" |
| 31 #include "base/prefs/pref_service.h" | 31 #include "base/prefs/pref_service.h" |
| 32 #include "base/thread_task_runner_handle.h" | 32 #include "base/thread_task_runner_handle.h" |
| 33 #include "base/threading/thread.h" | 33 #include "base/threading/thread.h" |
| 34 #include "base/time/time.h" | 34 #include "base/time/time.h" |
| 35 #include "chrome/browser/autocomplete/history_url_provider.h" | 35 #include "chrome/browser/autocomplete/history_url_provider.h" |
| 36 #include "chrome/browser/bookmarks/bookmark_model.h" | |
| 37 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 36 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 38 #include "chrome/browser/browser_process.h" | 37 #include "chrome/browser/browser_process.h" |
| 39 #include "chrome/browser/chrome_notification_types.h" | 38 #include "chrome/browser/chrome_notification_types.h" |
| 40 #include "chrome/browser/history/download_row.h" | 39 #include "chrome/browser/history/download_row.h" |
| 41 #include "chrome/browser/history/history_backend.h" | 40 #include "chrome/browser/history/history_backend.h" |
| 42 #include "chrome/browser/history/history_notifications.h" | 41 #include "chrome/browser/history/history_notifications.h" |
| 43 #include "chrome/browser/history/history_types.h" | 42 #include "chrome/browser/history/history_types.h" |
| 44 #include "chrome/browser/history/in_memory_database.h" | 43 #include "chrome/browser/history/in_memory_database.h" |
| 45 #include "chrome/browser/history/in_memory_history_backend.h" | 44 #include "chrome/browser/history/in_memory_history_backend.h" |
| 46 #include "chrome/browser/history/in_memory_url_index.h" | 45 #include "chrome/browser/history/in_memory_url_index.h" |
| 47 #include "chrome/browser/history/top_sites.h" | 46 #include "chrome/browser/history/top_sites.h" |
| 48 #include "chrome/browser/history/visit_database.h" | 47 #include "chrome/browser/history/visit_database.h" |
| 49 #include "chrome/browser/history/visit_filter.h" | 48 #include "chrome/browser/history/visit_filter.h" |
| 50 #include "chrome/browser/history/web_history_service.h" | 49 #include "chrome/browser/history/web_history_service.h" |
| 51 #include "chrome/browser/history/web_history_service_factory.h" | 50 #include "chrome/browser/history/web_history_service_factory.h" |
| 52 #include "chrome/browser/profiles/profile.h" | 51 #include "chrome/browser/profiles/profile.h" |
| 53 #include "chrome/browser/ui/profile_error_dialog.h" | 52 #include "chrome/browser/ui/profile_error_dialog.h" |
| 54 #include "chrome/common/chrome_constants.h" | 53 #include "chrome/common/chrome_constants.h" |
| 55 #include "chrome/common/chrome_switches.h" | 54 #include "chrome/common/chrome_switches.h" |
| 56 #include "chrome/common/importer/imported_favicon_usage.h" | 55 #include "chrome/common/importer/imported_favicon_usage.h" |
| 57 #include "chrome/common/pref_names.h" | 56 #include "chrome/common/pref_names.h" |
| 58 #include "chrome/common/thumbnail_score.h" | 57 #include "chrome/common/thumbnail_score.h" |
| 59 #include "chrome/common/url_constants.h" | 58 #include "chrome/common/url_constants.h" |
| 59 #include "components/bookmarks/core/browser/bookmark_model.h" |
| 60 #include "components/visitedlink/browser/visitedlink_master.h" | 60 #include "components/visitedlink/browser/visitedlink_master.h" |
| 61 #include "content/public/browser/browser_thread.h" | 61 #include "content/public/browser/browser_thread.h" |
| 62 #include "content/public/browser/download_item.h" | 62 #include "content/public/browser/download_item.h" |
| 63 #include "content/public/browser/notification_service.h" | 63 #include "content/public/browser/notification_service.h" |
| 64 #include "grit/chromium_strings.h" | 64 #include "grit/chromium_strings.h" |
| 65 #include "grit/generated_resources.h" | 65 #include "grit/generated_resources.h" |
| 66 #include "sync/api/sync_error_factory.h" | 66 #include "sync/api/sync_error_factory.h" |
| 67 #include "third_party/skia/include/core/SkBitmap.h" | 67 #include "third_party/skia/include/core/SkBitmap.h" |
| 68 | 68 |
| 69 using base::Time; | 69 using base::Time; |
| (...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1186 DCHECK(thread_checker_.CalledOnValidThread()); | 1186 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1187 visit_database_observers_.RemoveObserver(observer); | 1187 visit_database_observers_.RemoveObserver(observer); |
| 1188 } | 1188 } |
| 1189 | 1189 |
| 1190 void HistoryService::NotifyVisitDBObserversOnAddVisit( | 1190 void HistoryService::NotifyVisitDBObserversOnAddVisit( |
| 1191 const history::BriefVisitInfo& info) { | 1191 const history::BriefVisitInfo& info) { |
| 1192 DCHECK(thread_checker_.CalledOnValidThread()); | 1192 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1193 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, | 1193 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, |
| 1194 OnAddVisit(info)); | 1194 OnAddVisit(info)); |
| 1195 } | 1195 } |
| OLD | NEW |