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 COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 // Reads the last visit time for the given URL. | 144 // Reads the last visit time for the given URL. |
145 bool GetLastVisitTimeForURL(const GURL& url, base::Time* last_visit); | 145 bool GetLastVisitTimeForURL(const GURL& url, base::Time* last_visit); |
146 | 146 |
147 // Reads the number of times this URL has been visited. | 147 // Reads the number of times this URL has been visited. |
148 bool GetVisitCountForURL(const GURL& url, int* visit_count); | 148 bool GetVisitCountForURL(const GURL& url, int* visit_count); |
149 | 149 |
150 // Returns a pointer to the TypedUrlSyncableService owned by HistoryBackend. | 150 // Returns a pointer to the TypedUrlSyncableService owned by HistoryBackend. |
151 // This method should only be called from the history thread, because the | 151 // This method should only be called from the history thread, because the |
152 // returned service is intended to be accessed only via the history thread. | 152 // returned service is intended to be accessed only via the history thread. |
153 virtual TypedUrlSyncableService* GetTypedUrlSyncableService() const; | 153 TypedUrlSyncableService* GetTypedUrlSyncableService() const; |
154 | 154 |
155 // KeyedService: | 155 // KeyedService: |
156 void Shutdown() override; | 156 void Shutdown() override; |
157 | 157 |
158 // Callback for value asynchronously returned by GetCountsForOrigins(). | 158 // Callback for value asynchronously returned by GetCountsForOrigins(). |
159 typedef base::Callback<void(const OriginCountMap&)> | 159 typedef base::Callback<void(const OriginCountMap&)> |
160 GetCountsForOriginsCallback; | 160 GetCountsForOriginsCallback; |
161 | 161 |
162 // Computes the |num_hosts| most-visited hostnames in the past 30 days and | 162 // Computes the |num_hosts| most-visited hostnames in the past 30 days and |
163 // returns a list of those hosts paired with their visit counts. The following | 163 // returns a list of those hosts paired with their visit counts. The following |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 | 867 |
868 // All vended weak pointers are invalidated in Cleanup(). | 868 // All vended weak pointers are invalidated in Cleanup(). |
869 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; | 869 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; |
870 | 870 |
871 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 871 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
872 }; | 872 }; |
873 | 873 |
874 } // namespace history | 874 } // namespace history |
875 | 875 |
876 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 876 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
OLD | NEW |