| 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 13 matching lines...) Expand all Loading... |
| 24 #include "base/compiler_specific.h" | 24 #include "base/compiler_specific.h" |
| 25 #include "base/location.h" | 25 #include "base/location.h" |
| 26 #include "base/memory/ref_counted.h" | 26 #include "base/memory/ref_counted.h" |
| 27 #include "base/message_loop/message_loop.h" | 27 #include "base/message_loop/message_loop.h" |
| 28 #include "base/thread_task_runner_handle.h" | 28 #include "base/thread_task_runner_handle.h" |
| 29 #include "base/threading/thread.h" | 29 #include "base/threading/thread.h" |
| 30 #include "base/time/time.h" | 30 #include "base/time/time.h" |
| 31 #include "chrome/browser/history/history_backend.h" | 31 #include "chrome/browser/history/history_backend.h" |
| 32 #include "chrome/browser/history/in_memory_history_backend.h" | 32 #include "chrome/browser/history/in_memory_history_backend.h" |
| 33 #include "chrome/browser/history/in_memory_url_index.h" | 33 #include "chrome/browser/history/in_memory_url_index.h" |
| 34 #include "chrome/browser/history/web_history_service.h" | |
| 35 #include "chrome/browser/profiles/profile.h" | 34 #include "chrome/browser/profiles/profile.h" |
| 36 #include "chrome/common/url_constants.h" | 35 #include "chrome/common/url_constants.h" |
| 37 #include "components/dom_distiller/core/url_constants.h" | 36 #include "components/dom_distiller/core/url_constants.h" |
| 38 #include "components/history/core/browser/download_row.h" | 37 #include "components/history/core/browser/download_row.h" |
| 39 #include "components/history/core/browser/history_client.h" | 38 #include "components/history/core/browser/history_client.h" |
| 40 #include "components/history/core/browser/history_database_params.h" | 39 #include "components/history/core/browser/history_database_params.h" |
| 41 #include "components/history/core/browser/history_service_observer.h" | 40 #include "components/history/core/browser/history_service_observer.h" |
| 42 #include "components/history/core/browser/history_types.h" | 41 #include "components/history/core/browser/history_types.h" |
| 43 #include "components/history/core/browser/in_memory_database.h" | 42 #include "components/history/core/browser/in_memory_database.h" |
| 44 #include "components/history/core/browser/keyword_search_term.h" | 43 #include "components/history/core/browser/keyword_search_term.h" |
| 45 #include "components/history/core/browser/visit_database.h" | 44 #include "components/history/core/browser/visit_database.h" |
| 46 #include "components/history/core/browser/visit_filter.h" | 45 #include "components/history/core/browser/visit_filter.h" |
| 46 #include "components/history/core/browser/web_history_service.h" |
| 47 #include "components/history/core/common/thumbnail_score.h" | 47 #include "components/history/core/common/thumbnail_score.h" |
| 48 #include "components/visitedlink/browser/visitedlink_master.h" | 48 #include "components/visitedlink/browser/visitedlink_master.h" |
| 49 #include "content/public/browser/browser_thread.h" | 49 #include "content/public/browser/browser_thread.h" |
| 50 #include "content/public/browser/download_item.h" | 50 #include "content/public/browser/download_item.h" |
| 51 #include "sync/api/sync_error_factory.h" | 51 #include "sync/api/sync_error_factory.h" |
| 52 #include "third_party/skia/include/core/SkBitmap.h" | 52 #include "third_party/skia/include/core/SkBitmap.h" |
| 53 | 53 |
| 54 using base::Time; | 54 using base::Time; |
| 55 using history::HistoryBackend; | 55 using history::HistoryBackend; |
| 56 using history::KeywordID; | 56 using history::KeywordID; |
| (...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1275 const HistoryService::OnFaviconChangedCallback& callback) { | 1275 const HistoryService::OnFaviconChangedCallback& callback) { |
| 1276 DCHECK(thread_checker_.CalledOnValidThread()); | 1276 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1277 return favicon_changed_callback_list_.Add(callback); | 1277 return favicon_changed_callback_list_.Add(callback); |
| 1278 } | 1278 } |
| 1279 | 1279 |
| 1280 void HistoryService::NotifyFaviconChanged( | 1280 void HistoryService::NotifyFaviconChanged( |
| 1281 const std::set<GURL>& changed_favicons) { | 1281 const std::set<GURL>& changed_favicons) { |
| 1282 DCHECK(thread_checker_.CalledOnValidThread()); | 1282 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1283 favicon_changed_callback_list_.Notify(changed_favicons); | 1283 favicon_changed_callback_list_.Notify(changed_favicons); |
| 1284 } | 1284 } |
| OLD | NEW |