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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 void DeleteAllSearchTermsForKeyword(TemplateURLID keyword_id); | 274 void DeleteAllSearchTermsForKeyword(TemplateURLID keyword_id); |
275 | 275 |
276 void GetMostRecentKeywordSearchTerms( | 276 void GetMostRecentKeywordSearchTerms( |
277 scoped_refptr<GetMostRecentKeywordSearchTermsRequest> request, | 277 scoped_refptr<GetMostRecentKeywordSearchTermsRequest> request, |
278 TemplateURLID keyword_id, | 278 TemplateURLID keyword_id, |
279 const string16& prefix, | 279 const string16& prefix, |
280 int max_count); | 280 int max_count); |
281 | 281 |
282 // Generic operations -------------------------------------------------------- | 282 // Generic operations -------------------------------------------------------- |
283 | 283 |
| 284 // Returns our database if it has been set, otherwise NULL. |
| 285 URLDatabase* database() { return db_.get(); } |
| 286 |
284 void ProcessDBTask(scoped_refptr<HistoryDBTaskRequest> request); | 287 void ProcessDBTask(scoped_refptr<HistoryDBTaskRequest> request); |
285 | 288 |
286 virtual bool GetAllTypedURLs(std::vector<history::URLRow>* urls); | 289 virtual bool GetAllTypedURLs(std::vector<history::URLRow>* urls); |
287 | 290 |
288 virtual bool GetVisitsForURL(URLID id, VisitVector* visits); | 291 virtual bool GetVisitsForURL(URLID id, VisitVector* visits); |
289 | 292 |
290 // Fetches up to |max_visits| most recent visits for the passed URL. | 293 // Fetches up to |max_visits| most recent visits for the passed URL. |
291 virtual bool GetMostRecentVisitsForURL(URLID id, | 294 virtual bool GetMostRecentVisitsForURL(URLID id, |
292 int max_visits, | 295 int max_visits, |
293 VisitVector* visits); | 296 VisitVector* visits); |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 // Publishes the history to all indexers which are registered to receive | 639 // Publishes the history to all indexers which are registered to receive |
637 // history data from us. Can be NULL if there are no listeners. | 640 // history data from us. Can be NULL if there are no listeners. |
638 scoped_ptr<HistoryPublisher> history_publisher_; | 641 scoped_ptr<HistoryPublisher> history_publisher_; |
639 | 642 |
640 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 643 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
641 }; | 644 }; |
642 | 645 |
643 } // namespace history | 646 } // namespace history |
644 | 647 |
645 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 648 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
OLD | NEW |