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 |
286 void ProcessDBTask(scoped_refptr<HistoryDBTaskRequest> request); | 289 void ProcessDBTask(scoped_refptr<HistoryDBTaskRequest> request); |
287 | 290 |
288 virtual bool GetAllTypedURLs(std::vector<history::URLRow>* urls); | 291 virtual bool GetAllTypedURLs(std::vector<history::URLRow>* urls); |
289 | 292 |
290 virtual bool GetVisitsForURL(URLID id, VisitVector* visits); | 293 virtual bool GetVisitsForURL(URLID id, VisitVector* visits); |
291 | 294 |
292 // Fetches up to |max_visits| most recent visits for the passed URL. | 295 // Fetches up to |max_visits| most recent visits for the passed URL. |
293 virtual bool GetMostRecentVisitsForURL(URLID id, | 296 virtual bool GetMostRecentVisitsForURL(URLID id, |
294 int max_visits, | 297 int max_visits, |
295 VisitVector* visits); | 298 VisitVector* visits); |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 // Publishes the history to all indexers which are registered to receive | 643 // Publishes the history to all indexers which are registered to receive |
641 // history data from us. Can be NULL if there are no listeners. | 644 // history data from us. Can be NULL if there are no listeners. |
642 scoped_ptr<HistoryPublisher> history_publisher_; | 645 scoped_ptr<HistoryPublisher> history_publisher_; |
643 | 646 |
644 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 647 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
645 }; | 648 }; |
646 | 649 |
647 } // namespace history | 650 } // namespace history |
648 | 651 |
649 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 652 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
OLD | NEW |