| OLD | NEW | 
|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 25 matching lines...) Expand all  Loading... | 
| 36 #include "chrome/browser/history/download_types.h" | 36 #include "chrome/browser/history/download_types.h" | 
| 37 #include "chrome/browser/history/history_backend.h" | 37 #include "chrome/browser/history/history_backend.h" | 
| 38 #include "chrome/browser/history/history_types.h" | 38 #include "chrome/browser/history/history_types.h" | 
| 39 #include "chrome/browser/history/in_memory_database.h" | 39 #include "chrome/browser/history/in_memory_database.h" | 
| 40 #include "chrome/browser/history/in_memory_history_backend.h" | 40 #include "chrome/browser/history/in_memory_history_backend.h" | 
| 41 #include "chrome/browser/profile.h" | 41 #include "chrome/browser/profile.h" | 
| 42 #include "chrome/browser/visitedlink_master.h" | 42 #include "chrome/browser/visitedlink_master.h" | 
| 43 #include "chrome/common/chrome_constants.h" | 43 #include "chrome/common/chrome_constants.h" | 
| 44 #include "chrome/common/l10n_util.h" | 44 #include "chrome/common/l10n_util.h" | 
| 45 #include "chrome/common/notification_service.h" | 45 #include "chrome/common/notification_service.h" | 
|  | 46 #include "chrome/common/thumbnail_score.h" | 
| 46 | 47 | 
| 47 #include "chromium_strings.h" | 48 #include "chromium_strings.h" | 
| 48 #include "generated_resources.h" | 49 #include "generated_resources.h" | 
| 49 | 50 | 
| 50 using base::Time; | 51 using base::Time; | 
| 51 using history::HistoryBackend; | 52 using history::HistoryBackend; | 
| 52 | 53 | 
| 53 // Sends messages from the backend to us on the main thread. This must be a | 54 // Sends messages from the backend to us on the main thread. This must be a | 
| 54 // separate class from the history service so that it can hold a reference to | 55 // separate class from the history service so that it can hold a reference to | 
| 55 // the history service (otherwise we would have to manually AddRef and | 56 // the history service (otherwise we would have to manually AddRef and | 
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 652   NotificationService::current()->Notify(type, source, det); | 653   NotificationService::current()->Notify(type, source, det); | 
| 653 } | 654 } | 
| 654 | 655 | 
| 655 void HistoryService::OnDBLoaded() { | 656 void HistoryService::OnDBLoaded() { | 
| 656   LOG(INFO) << "History backend finished loading"; | 657   LOG(INFO) << "History backend finished loading"; | 
| 657   backend_loaded_ = true; | 658   backend_loaded_ = true; | 
| 658   NotificationService::current()->Notify(NotificationType::HISTORY_LOADED, | 659   NotificationService::current()->Notify(NotificationType::HISTORY_LOADED, | 
| 659                                          Source<Profile>(profile_), | 660                                          Source<Profile>(profile_), | 
| 660                                          Details<HistoryService>(this)); | 661                                          Details<HistoryService>(this)); | 
| 661 } | 662 } | 
| OLD | NEW | 
|---|