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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 // Send the notification to the history service on the main thread. | 169 // Send the notification to the history service on the main thread. |
170 service_task_runner_->PostTask( | 170 service_task_runner_->PostTask( |
171 FROM_HERE, | 171 FROM_HERE, |
172 base::Bind( | 172 base::Bind( |
173 &HistoryService::NotifyFaviconChanged, history_service_, urls)); | 173 &HistoryService::NotifyFaviconChanged, history_service_, urls)); |
174 } | 174 } |
175 | 175 |
176 virtual void NotifyURLVisited(ui::PageTransition transition, | 176 virtual void NotifyURLVisited(ui::PageTransition transition, |
177 const history::URLRow& row, | 177 const history::URLRow& row, |
178 const history::RedirectList& redirects, | 178 const history::RedirectList& redirects, |
179 base::Time visit_time) OVERRIDE { | 179 base::Time visit_time) override { |
180 service_task_runner_->PostTask(FROM_HERE, | 180 service_task_runner_->PostTask(FROM_HERE, |
181 base::Bind(&HistoryService::NotifyURLVisited, | 181 base::Bind(&HistoryService::NotifyURLVisited, |
182 history_service_, | 182 history_service_, |
183 transition, | 183 transition, |
184 row, | 184 row, |
185 redirects, | 185 redirects, |
186 visit_time)); | 186 visit_time)); |
187 } | 187 } |
188 | 188 |
189 virtual void BroadcastNotifications( | 189 virtual void BroadcastNotifications( |
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1264 const HistoryService::OnFaviconChangedCallback& callback) { | 1264 const HistoryService::OnFaviconChangedCallback& callback) { |
1265 DCHECK(thread_checker_.CalledOnValidThread()); | 1265 DCHECK(thread_checker_.CalledOnValidThread()); |
1266 return favicon_changed_callback_list_.Add(callback); | 1266 return favicon_changed_callback_list_.Add(callback); |
1267 } | 1267 } |
1268 | 1268 |
1269 void HistoryService::NotifyFaviconChanged( | 1269 void HistoryService::NotifyFaviconChanged( |
1270 const std::set<GURL>& changed_favicons) { | 1270 const std::set<GURL>& changed_favicons) { |
1271 DCHECK(thread_checker_.CalledOnValidThread()); | 1271 DCHECK(thread_checker_.CalledOnValidThread()); |
1272 favicon_changed_callback_list_.Notify(changed_favicons); | 1272 favicon_changed_callback_list_.Notify(changed_favicons); |
1273 } | 1273 } |
OLD | NEW |