| 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 COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
| 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 // notification (NOTIFY_HISTORY_LOADED) and sets backend_loaded_ to true. | 558 // notification (NOTIFY_HISTORY_LOADED) and sets backend_loaded_ to true. |
| 559 void OnDBLoaded(); | 559 void OnDBLoaded(); |
| 560 | 560 |
| 561 // Helper function for getting URL information. | 561 // Helper function for getting URL information. |
| 562 // Reads a URLRow from in-memory database. Returns false if database is not | 562 // Reads a URLRow from in-memory database. Returns false if database is not |
| 563 // available or the URL does not exist. | 563 // available or the URL does not exist. |
| 564 bool GetRowForURL(const GURL& url, URLRow* url_row); | 564 bool GetRowForURL(const GURL& url, URLRow* url_row); |
| 565 | 565 |
| 566 // Observers ---------------------------------------------------------------- | 566 // Observers ---------------------------------------------------------------- |
| 567 | 567 |
| 568 // Notify all Observers registered that the VisitDatabase was changed. | |
| 569 void NotifyAddVisit(const BriefVisitInfo& info); | |
| 570 | |
| 571 // Notify all HistoryServiceObservers registered that user is visiting a URL. | 568 // Notify all HistoryServiceObservers registered that user is visiting a URL. |
| 572 // The |row| ID will be set to the value that is currently in effect in the | 569 // The |row| ID will be set to the value that is currently in effect in the |
| 573 // main history database. |redirects| is the list of redirects leading up to | 570 // main history database. |redirects| is the list of redirects leading up to |
| 574 // the URL. If we have a redirect chain A -> B -> C and user is visiting C, | 571 // the URL. If we have a redirect chain A -> B -> C and user is visiting C, |
| 575 // then |redirects[0]=B| and |redirects[1]=A|. If there are no redirects, | 572 // then |redirects[0]=B| and |redirects[1]=A|. If there are no redirects, |
| 576 // |redirects| is an empty vector. | 573 // |redirects| is an empty vector. |
| 577 void NotifyURLVisited(ui::PageTransition transition, | 574 void NotifyURLVisited(ui::PageTransition transition, |
| 578 const URLRow& row, | 575 const URLRow& row, |
| 579 const RedirectList& redirects, | 576 const RedirectList& redirects, |
| 580 base::Time visit_time); | 577 base::Time visit_time); |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 | 805 |
| 809 // All vended weak pointers are invalidated in Cleanup(). | 806 // All vended weak pointers are invalidated in Cleanup(). |
| 810 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; | 807 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; |
| 811 | 808 |
| 812 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 809 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
| 813 }; | 810 }; |
| 814 | 811 |
| 815 } // namespace history | 812 } // namespace history |
| 816 | 813 |
| 817 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 814 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
| OLD | NEW |