| 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 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1169 DCHECK(thread_checker_.CalledOnValidThread()); | 1167 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1170 visit_database_observers_.RemoveObserver(observer); | 1168 visit_database_observers_.RemoveObserver(observer); |
| 1171 } | 1169 } |
| 1172 | 1170 |
| 1173 void HistoryService::NotifyVisitDBObserversOnAddVisit( | 1171 void HistoryService::NotifyVisitDBObserversOnAddVisit( |
| 1174 const history::BriefVisitInfo& info) { | 1172 const history::BriefVisitInfo& info) { |
| 1175 DCHECK(thread_checker_.CalledOnValidThread()); | 1173 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1176 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, | 1174 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, |
| 1177 OnAddVisit(info)); | 1175 OnAddVisit(info)); |
| 1178 } | 1176 } |
| OLD | NEW |