| 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 | 294 |
| 295 virtual bool UpdateURL(URLID id, const history::URLRow& url); | 295 virtual bool UpdateURL(URLID id, const history::URLRow& url); |
| 296 | 296 |
| 297 // While adding visits in batch, the source needs to be provided. | 297 // While adding visits in batch, the source needs to be provided. |
| 298 virtual bool AddVisits(const GURL& url, | 298 virtual bool AddVisits(const GURL& url, |
| 299 const std::vector<history::VisitInfo>& visits, | 299 const std::vector<history::VisitInfo>& visits, |
| 300 VisitSource visit_source); | 300 VisitSource visit_source); |
| 301 | 301 |
| 302 virtual bool RemoveVisits(const VisitVector& visits); | 302 virtual bool RemoveVisits(const VisitVector& visits); |
| 303 | 303 |
| 304 // Returns the VisitSource associated with each one of the passed visits. |
| 305 // If there is no entry in the map for a given visit, that means the visit |
| 306 // was SOURCE_BROWSED. Returns false if there is no HistoryDatabase.. |
| 307 bool GetVisitsSource(const VisitVector& visits, VisitSourceMap* sources); |
| 308 |
| 304 virtual bool GetURL(const GURL& url, history::URLRow* url_row); | 309 virtual bool GetURL(const GURL& url, history::URLRow* url_row); |
| 305 | 310 |
| 306 // Deleting ------------------------------------------------------------------ | 311 // Deleting ------------------------------------------------------------------ |
| 307 | 312 |
| 308 virtual void DeleteURLs(const std::vector<GURL>& urls); | 313 virtual void DeleteURLs(const std::vector<GURL>& urls); |
| 309 | 314 |
| 310 virtual void DeleteURL(const GURL& url); | 315 virtual void DeleteURL(const GURL& url); |
| 311 | 316 |
| 312 // Calls ExpireHistoryBackend::ExpireHistoryBetween and commits the change. | 317 // Calls ExpireHistoryBackend::ExpireHistoryBetween and commits the change. |
| 313 void ExpireHistoryBetween( | 318 void ExpireHistoryBetween( |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 // Publishes the history to all indexers which are registered to receive | 636 // Publishes the history to all indexers which are registered to receive |
| 632 // history data from us. Can be NULL if there are no listeners. | 637 // history data from us. Can be NULL if there are no listeners. |
| 633 scoped_ptr<HistoryPublisher> history_publisher_; | 638 scoped_ptr<HistoryPublisher> history_publisher_; |
| 634 | 639 |
| 635 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 640 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
| 636 }; | 641 }; |
| 637 | 642 |
| 638 } // namespace history | 643 } // namespace history |
| 639 | 644 |
| 640 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 645 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
| OLD | NEW |