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 // -> ArchivedDatabase | |
16 // -> SQLite connection to Archived History | |
17 // -> ThumbnailDatabase | 15 // -> ThumbnailDatabase |
18 // -> SQLite connection to Thumbnails | 16 // -> SQLite connection to Thumbnails |
19 // (and favicons) | 17 // (and favicons) |
20 | 18 |
21 #include "chrome/browser/history/history_service.h" | 19 #include "chrome/browser/history/history_service.h" |
22 | 20 |
23 #include "base/bind_helpers.h" | 21 #include "base/bind_helpers.h" |
24 #include "base/callback.h" | 22 #include "base/callback.h" |
25 #include "base/command_line.h" | 23 #include "base/command_line.h" |
26 #include "base/compiler_specific.h" | 24 #include "base/compiler_specific.h" |
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1186 DCHECK(thread_checker_.CalledOnValidThread()); | 1184 DCHECK(thread_checker_.CalledOnValidThread()); |
1187 visit_database_observers_.RemoveObserver(observer); | 1185 visit_database_observers_.RemoveObserver(observer); |
1188 } | 1186 } |
1189 | 1187 |
1190 void HistoryService::NotifyVisitDBObserversOnAddVisit( | 1188 void HistoryService::NotifyVisitDBObserversOnAddVisit( |
1191 const history::BriefVisitInfo& info) { | 1189 const history::BriefVisitInfo& info) { |
1192 DCHECK(thread_checker_.CalledOnValidThread()); | 1190 DCHECK(thread_checker_.CalledOnValidThread()); |
1193 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, | 1191 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, |
1194 OnAddVisit(info)); | 1192 OnAddVisit(info)); |
1195 } | 1193 } |
OLD | NEW |