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 |
11 // ----------- -------------- | 11 // ----------- -------------- |
12 // HistoryService <----------------> HistoryBackend | 12 // HistoryService <----------------> HistoryBackend |
13 // -> HistoryDatabase | 13 // -> HistoryDatabase |
14 // -> SQLite connection to History | 14 // -> SQLite connection to History |
15 // -> ThumbnailDatabase | 15 // -> ThumbnailDatabase |
16 // -> SQLite connection to Thumbnails | 16 // -> SQLite connection to Thumbnails |
17 // (and favicons) | 17 // (and favicons) |
18 | 18 |
19 #include "chrome/browser/history/history_service.h" | 19 #include "chrome/browser/history/history_service.h" |
20 | 20 |
21 #include "base/bind_helpers.h" | 21 #include "base/bind_helpers.h" |
22 #include "base/callback.h" | 22 #include "base/callback.h" |
23 #include "base/command_line.h" | 23 #include "base/command_line.h" |
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/path_service.h" | |
29 #include "base/prefs/pref_service.h" | 28 #include "base/prefs/pref_service.h" |
30 #include "base/thread_task_runner_handle.h" | 29 #include "base/thread_task_runner_handle.h" |
31 #include "base/threading/thread.h" | 30 #include "base/threading/thread.h" |
32 #include "base/time/time.h" | 31 #include "base/time/time.h" |
33 #include "chrome/browser/browser_process.h" | 32 #include "chrome/browser/browser_process.h" |
34 #include "chrome/browser/chrome_notification_types.h" | 33 #include "chrome/browser/chrome_notification_types.h" |
35 #include "chrome/browser/history/download_row.h" | 34 #include "chrome/browser/history/download_row.h" |
36 #include "chrome/browser/history/history_backend.h" | 35 #include "chrome/browser/history/history_backend.h" |
37 #include "chrome/browser/history/history_notifications.h" | 36 #include "chrome/browser/history/history_notifications.h" |
38 #include "chrome/browser/history/in_memory_history_backend.h" | 37 #include "chrome/browser/history/in_memory_history_backend.h" |
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1260 const HistoryService::OnFaviconChangedCallback& callback) { | 1259 const HistoryService::OnFaviconChangedCallback& callback) { |
1261 DCHECK(thread_checker_.CalledOnValidThread()); | 1260 DCHECK(thread_checker_.CalledOnValidThread()); |
1262 return favicon_changed_callback_list_.Add(callback); | 1261 return favicon_changed_callback_list_.Add(callback); |
1263 } | 1262 } |
1264 | 1263 |
1265 void HistoryService::NotifyFaviconChanged( | 1264 void HistoryService::NotifyFaviconChanged( |
1266 const std::set<GURL>& changed_favicons) { | 1265 const std::set<GURL>& changed_favicons) { |
1267 DCHECK(thread_checker_.CalledOnValidThread()); | 1266 DCHECK(thread_checker_.CalledOnValidThread()); |
1268 favicon_changed_callback_list_.Notify(changed_favicons); | 1267 favicon_changed_callback_list_.Notify(changed_favicons); |
1269 } | 1268 } |
OLD | NEW |