| 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 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
| 18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
| 19 #include "base/observer_list.h" | 19 #include "base/observer_list.h" |
| 20 #include "base/string16.h" | 20 #include "base/string16.h" |
| 21 #include "base/threading/thread_checker.h" | 21 #include "base/threading/thread_checker.h" |
| 22 #include "base/time.h" | 22 #include "base/time.h" |
| 23 #include "chrome/browser/common/cancelable_request.h" | 23 #include "chrome/browser/common/cancelable_request.h" |
| 24 #include "chrome/browser/favicon/favicon_service.h" | 24 #include "chrome/browser/favicon/favicon_service.h" |
| 25 #include "chrome/browser/history/delete_directive_handler.h" | 25 #include "chrome/browser/history/delete_directive_handler.h" |
| 26 #include "chrome/browser/history/history_types.h" | 26 #include "chrome/browser/history/history_types.h" |
| 27 #include "chrome/browser/history/typed_url_syncable_service.h" |
| 27 #include "chrome/browser/profiles/profile_keyed_service.h" | 28 #include "chrome/browser/profiles/profile_keyed_service.h" |
| 28 #include "chrome/browser/search_engines/template_url_id.h" | 29 #include "chrome/browser/search_engines/template_url_id.h" |
| 29 #include "chrome/common/cancelable_task_tracker.h" | 30 #include "chrome/common/cancelable_task_tracker.h" |
| 30 #include "chrome/common/ref_counted_util.h" | 31 #include "chrome/common/ref_counted_util.h" |
| 31 #include "components/visitedlink/browser/visitedlink_delegate.h" | 32 #include "components/visitedlink/browser/visitedlink_delegate.h" |
| 32 #include "content/public/browser/notification_observer.h" | 33 #include "content/public/browser/notification_observer.h" |
| 33 #include "content/public/browser/notification_registrar.h" | 34 #include "content/public/browser/notification_registrar.h" |
| 34 #include "content/public/common/page_transition_types.h" | 35 #include "content/public/common/page_transition_types.h" |
| 35 #include "sql/init_status.h" | 36 #include "sql/init_status.h" |
| 36 #include "sync/api/syncable_service.h" | 37 #include "sync/api/syncable_service.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 152 |
| 152 // Reads the number of times the user has typed the given URL. | 153 // Reads the number of times the user has typed the given URL. |
| 153 bool GetTypedCountForURL(const GURL& url, int* typed_count); | 154 bool GetTypedCountForURL(const GURL& url, int* typed_count); |
| 154 | 155 |
| 155 // Reads the last visit time for the given URL. | 156 // Reads the last visit time for the given URL. |
| 156 bool GetLastVisitTimeForURL(const GURL& url, base::Time* last_visit); | 157 bool GetLastVisitTimeForURL(const GURL& url, base::Time* last_visit); |
| 157 | 158 |
| 158 // Reads the number of times this URL has been visited. | 159 // Reads the number of times this URL has been visited. |
| 159 bool GetVisitCountForURL(const GURL& url, int* visit_count); | 160 bool GetVisitCountForURL(const GURL& url, int* visit_count); |
| 160 | 161 |
| 162 // Returns a pointer to the TypedUrlSyncableService owned by HistoryBackend. |
| 163 // This method should only be called from the history thread, because the |
| 164 // returned service is intended to be accessed only via the history thread. |
| 165 history::TypedUrlSyncableService* GetTypedUrlSyncableService() const; |
| 166 |
| 161 // Return the quick history index. | 167 // Return the quick history index. |
| 162 history::InMemoryURLIndex* InMemoryIndex() const { | 168 history::InMemoryURLIndex* InMemoryIndex() const { |
| 163 return in_memory_url_index_.get(); | 169 return in_memory_url_index_.get(); |
| 164 } | 170 } |
| 165 | 171 |
| 166 // ProfileKeyedService: | 172 // ProfileKeyedService: |
| 167 virtual void Shutdown() OVERRIDE; | 173 virtual void Shutdown() OVERRIDE; |
| 168 | 174 |
| 169 // Navigation ---------------------------------------------------------------- | 175 // Navigation ---------------------------------------------------------------- |
| 170 | 176 |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1086 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; | 1092 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; |
| 1087 | 1093 |
| 1088 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; | 1094 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; |
| 1089 | 1095 |
| 1090 history::DeleteDirectiveHandler delete_directive_handler_; | 1096 history::DeleteDirectiveHandler delete_directive_handler_; |
| 1091 | 1097 |
| 1092 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 1098 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
| 1093 }; | 1099 }; |
| 1094 | 1100 |
| 1095 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 1101 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
| OLD | NEW |