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 #ifndef CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "content/public/browser/notification_registrar.h" | 36 #include "content/public/browser/notification_registrar.h" |
37 #include "content/public/common/page_transition_types.h" | 37 #include "content/public/common/page_transition_types.h" |
38 #include "sql/init_status.h" | 38 #include "sql/init_status.h" |
39 #include "sync/api/syncable_service.h" | 39 #include "sync/api/syncable_service.h" |
40 | 40 |
41 #if defined(OS_ANDROID) | 41 #if defined(OS_ANDROID) |
42 class AndroidHistoryProviderService; | 42 class AndroidHistoryProviderService; |
43 #endif | 43 #endif |
44 | 44 |
45 class GURL; | 45 class GURL; |
46 class HistoryURLProvider; | |
47 class PageUsageData; | 46 class PageUsageData; |
48 class PageUsageRequest; | 47 class PageUsageRequest; |
49 class Profile; | 48 class Profile; |
50 struct HistoryURLProviderParams; | |
51 struct ImportedFaviconUsage; | 49 struct ImportedFaviconUsage; |
52 | 50 |
53 namespace base { | 51 namespace base { |
54 class FilePath; | 52 class FilePath; |
55 class Thread; | 53 class Thread; |
56 } | 54 } |
57 | 55 |
58 namespace visitedlink { | 56 namespace visitedlink { |
59 class VisitedLinkMaster; | 57 class VisitedLinkMaster; |
60 } | 58 } |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 virtual void RebuildTable( | 610 virtual void RebuildTable( |
613 const scoped_refptr<URLEnumerator>& enumerator) OVERRIDE; | 611 const scoped_refptr<URLEnumerator>& enumerator) OVERRIDE; |
614 | 612 |
615 // Low-level Init(). Same as the public version, but adds a |no_db| parameter | 613 // Low-level Init(). Same as the public version, but adds a |no_db| parameter |
616 // that is only set by unittests which causes the backend to not init its DB. | 614 // that is only set by unittests which causes the backend to not init its DB. |
617 bool Init(const base::FilePath& history_dir, bool no_db); | 615 bool Init(const base::FilePath& history_dir, bool no_db); |
618 | 616 |
619 // Called by the HistoryURLProvider class to schedule an autocomplete, it | 617 // Called by the HistoryURLProvider class to schedule an autocomplete, it |
620 // will be called back on the internal history thread with the history | 618 // will be called back on the internal history thread with the history |
621 // database so it can query. See history_autocomplete.cc for a diagram. | 619 // database so it can query. See history_autocomplete.cc for a diagram. |
622 void ScheduleAutocomplete(HistoryURLProvider* provider, | 620 void ScheduleAutocomplete(const base::Callback< |
623 HistoryURLProviderParams* params); | 621 void(history::HistoryBackend*, history::URLDatabase*)>& callback); |
624 | 622 |
625 // Broadcasts the given notification. This is called by the backend so that | 623 // Broadcasts the given notification. This is called by the backend so that |
626 // the notification will be broadcast on the main thread. | 624 // the notification will be broadcast on the main thread. |
627 void BroadcastNotificationsHelper( | 625 void BroadcastNotificationsHelper( |
628 int type, | 626 int type, |
629 scoped_ptr<history::HistoryDetails> details); | 627 scoped_ptr<history::HistoryDetails> details); |
630 | 628 |
631 // Notification from the backend that it has finished loading. Sends | 629 // Notification from the backend that it has finished loading. Sends |
632 // notification (NOTIFY_HISTORY_LOADED) and sets backend_loaded_ to true. | 630 // notification (NOTIFY_HISTORY_LOADED) and sets backend_loaded_ to true. |
633 void OnDBLoaded(); | 631 void OnDBLoaded(); |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1034 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; | 1032 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; |
1035 | 1033 |
1036 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; | 1034 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; |
1037 | 1035 |
1038 history::DeleteDirectiveHandler delete_directive_handler_; | 1036 history::DeleteDirectiveHandler delete_directive_handler_; |
1039 | 1037 |
1040 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 1038 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
1041 }; | 1039 }; |
1042 | 1040 |
1043 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 1041 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
OLD | NEW |