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 CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 | 582 |
583 // Notification from the backend that it has finished loading. Sends | 583 // Notification from the backend that it has finished loading. Sends |
584 // notification (NOTIFY_HISTORY_LOADED) and sets backend_loaded_ to true. | 584 // notification (NOTIFY_HISTORY_LOADED) and sets backend_loaded_ to true. |
585 void OnDBLoaded(); | 585 void OnDBLoaded(); |
586 | 586 |
587 // Helper function for getting URL information. | 587 // Helper function for getting URL information. |
588 // Reads a URLRow from in-memory database. Returns false if database is not | 588 // Reads a URLRow from in-memory database. Returns false if database is not |
589 // available or the URL does not exist. | 589 // available or the URL does not exist. |
590 bool GetRowForURL(const GURL& url, history::URLRow* url_row); | 590 bool GetRowForURL(const GURL& url, history::URLRow* url_row); |
591 | 591 |
592 // Observers ----------------------------------------------------------------- | 592 // Observers ---------------------------------------------------------------- |
593 | 593 |
594 // Notify all Observers registered that the VisitDatabase was changed. | 594 // Notify all Observers registered that the VisitDatabase was changed. |
595 void NotifyAddVisit(const history::BriefVisitInfo& info); | 595 void NotifyAddVisit(const history::BriefVisitInfo& info); |
596 | 596 |
| 597 // Notify all HistoryServiceObservers registered that user is visiting a URL. |
| 598 // The |row| ID will be set to the value that is currently in effect in the |
| 599 // main history database. |redirects| is the list of redirects leading up to |
| 600 // the URL. If we have a redirect chain A -> B -> C and user is visiting C, |
| 601 // then |redirects[0]=B| and |redirects[1]=A|. If there are no redirects, |
| 602 // |redirects| is an empty vector. |
| 603 void NotifyURLVisited(ui::PageTransition transition, |
| 604 const history::URLRow& row, |
| 605 const history::RedirectList& redirects, |
| 606 base::Time visit_time); |
| 607 |
597 // Favicon ------------------------------------------------------------------- | 608 // Favicon ------------------------------------------------------------------- |
598 | 609 |
599 // These favicon methods are exposed to the FaviconService. Instead of calling | 610 // These favicon methods are exposed to the FaviconService. Instead of calling |
600 // these methods directly you should call the respective method on the | 611 // these methods directly you should call the respective method on the |
601 // FaviconService. | 612 // FaviconService. |
602 | 613 |
603 // Used by FaviconService to get the favicon bitmaps from the history backend | 614 // Used by FaviconService to get the favicon bitmaps from the history backend |
604 // whose edge sizes most closely match |desired_sizes| for |icon_types|. If | 615 // whose edge sizes most closely match |desired_sizes| for |icon_types|. If |
605 // |desired_sizes| has a '0' entry, the largest favicon bitmap for | 616 // |desired_sizes| has a '0' entry, the largest favicon bitmap for |
606 // |icon_types| is returned. The returned FaviconBitmapResults will have at | 617 // |icon_types| is returned. The returned FaviconBitmapResults will have at |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
884 | 895 |
885 history::DeleteDirectiveHandler delete_directive_handler_; | 896 history::DeleteDirectiveHandler delete_directive_handler_; |
886 | 897 |
887 // All vended weak pointers are invalidated in Cleanup(). | 898 // All vended weak pointers are invalidated in Cleanup(). |
888 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; | 899 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; |
889 | 900 |
890 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 901 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
891 }; | 902 }; |
892 | 903 |
893 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 904 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
OLD | NEW |