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 29 matching lines...) Expand all Loading... |
40 #include "chrome/browser/visitedlink_master.h" | 40 #include "chrome/browser/visitedlink_master.h" |
41 #include "chrome/common/chrome_constants.h" | 41 #include "chrome/common/chrome_constants.h" |
42 #include "chrome/common/l10n_util.h" | 42 #include "chrome/common/l10n_util.h" |
43 #include "chrome/common/notification_service.h" | 43 #include "chrome/common/notification_service.h" |
44 #include "chrome/common/sqlite_utils.h" | 44 #include "chrome/common/sqlite_utils.h" |
45 #include "chrome/common/thumbnail_score.h" | 45 #include "chrome/common/thumbnail_score.h" |
46 | 46 |
47 #include "chromium_strings.h" | 47 #include "chromium_strings.h" |
48 #include "generated_resources.h" | 48 #include "generated_resources.h" |
49 | 49 |
| 50 using base::Time; |
50 using history::HistoryBackend; | 51 using history::HistoryBackend; |
51 | 52 |
52 // Sends messages from the backend to us on the main thread. This must be a | 53 // Sends messages from the backend to us on the main thread. This must be a |
53 // separate class from the history service so that it can hold a reference to | 54 // separate class from the history service so that it can hold a reference to |
54 // the history service (otherwise we would have to manually AddRef and | 55 // the history service (otherwise we would have to manually AddRef and |
55 // Release when the Backend has a reference to us). | 56 // Release when the Backend has a reference to us). |
56 class HistoryService::BackendDelegate : public HistoryBackend::Delegate { | 57 class HistoryService::BackendDelegate : public HistoryBackend::Delegate { |
57 public: | 58 public: |
58 explicit BackendDelegate(HistoryService* history_service) | 59 explicit BackendDelegate(HistoryService* history_service) |
59 : history_service_(history_service), | 60 : history_service_(history_service), |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 NotificationService::current()->Notify(type, source, det); | 645 NotificationService::current()->Notify(type, source, det); |
645 } | 646 } |
646 | 647 |
647 void HistoryService::OnDBLoaded() { | 648 void HistoryService::OnDBLoaded() { |
648 LOG(INFO) << "History backend finished loading"; | 649 LOG(INFO) << "History backend finished loading"; |
649 backend_loaded_ = true; | 650 backend_loaded_ = true; |
650 NotificationService::current()->Notify(NOTIFY_HISTORY_LOADED, | 651 NotificationService::current()->Notify(NOTIFY_HISTORY_LOADED, |
651 Source<Profile>(profile_), | 652 Source<Profile>(profile_), |
652 Details<HistoryService>(this)); | 653 Details<HistoryService>(this)); |
653 } | 654 } |
OLD | NEW |