OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BACKEND_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
6 #define CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 void DeleteAllSearchTermsForKeyword(TemplateURLID keyword_id); | 276 void DeleteAllSearchTermsForKeyword(TemplateURLID keyword_id); |
277 | 277 |
278 void GetMostRecentKeywordSearchTerms( | 278 void GetMostRecentKeywordSearchTerms( |
279 scoped_refptr<GetMostRecentKeywordSearchTermsRequest> request, | 279 scoped_refptr<GetMostRecentKeywordSearchTermsRequest> request, |
280 TemplateURLID keyword_id, | 280 TemplateURLID keyword_id, |
281 const string16& prefix, | 281 const string16& prefix, |
282 int max_count); | 282 int max_count); |
283 | 283 |
284 // Generic operations -------------------------------------------------------- | 284 // Generic operations -------------------------------------------------------- |
285 | 285 |
286 // Returns our database if it has been set, otherwise NULL. | |
287 URLDatabase* database() { return db_.get(); } | |
288 | |
289 void ProcessDBTask(scoped_refptr<HistoryDBTaskRequest> request); | 286 void ProcessDBTask(scoped_refptr<HistoryDBTaskRequest> request); |
290 | 287 |
291 virtual bool GetAllTypedURLs(std::vector<history::URLRow>* urls); | 288 virtual bool GetAllTypedURLs(std::vector<history::URLRow>* urls); |
292 | 289 |
293 virtual bool GetVisitsForURL(URLID id, VisitVector* visits); | 290 virtual bool GetVisitsForURL(URLID id, VisitVector* visits); |
294 | 291 |
295 // Fetches up to |max_visits| most recent visits for the passed URL. | 292 // Fetches up to |max_visits| most recent visits for the passed URL. |
296 virtual bool GetMostRecentVisitsForURL(URLID id, | 293 virtual bool GetMostRecentVisitsForURL(URLID id, |
297 int max_visits, | 294 int max_visits, |
298 VisitVector* visits); | 295 VisitVector* visits); |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 // Publishes the history to all indexers which are registered to receive | 640 // Publishes the history to all indexers which are registered to receive |
644 // history data from us. Can be NULL if there are no listeners. | 641 // history data from us. Can be NULL if there are no listeners. |
645 scoped_ptr<HistoryPublisher> history_publisher_; | 642 scoped_ptr<HistoryPublisher> history_publisher_; |
646 | 643 |
647 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 644 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
648 }; | 645 }; |
649 | 646 |
650 } // namespace history | 647 } // namespace history |
651 | 648 |
652 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 649 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
OLD | NEW |