| 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_BACKEND_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ |
| 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ | 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 AddPageVisitFiresNotificationWithCorrectDetails); | 477 AddPageVisitFiresNotificationWithCorrectDetails); |
| 478 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, AddPageArgsSource); | 478 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, AddPageArgsSource); |
| 479 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, AddVisitsSource); | 479 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, AddVisitsSource); |
| 480 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetMostRecentVisits); | 480 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetMostRecentVisits); |
| 481 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, RemoveVisitsSource); | 481 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, RemoveVisitsSource); |
| 482 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, RemoveVisitsTransitions); | 482 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, RemoveVisitsTransitions); |
| 483 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MigrationVisitSource); | 483 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MigrationVisitSource); |
| 484 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, | 484 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, |
| 485 SetFaviconMappingsForPageAndRedirects); | 485 SetFaviconMappingsForPageAndRedirects); |
| 486 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, | 486 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, |
| 487 SetFaviconMappingsForPageAndRedirectsWithFragment); |
| 488 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, |
| 487 SetFaviconMappingsForPageDuplicates); | 489 SetFaviconMappingsForPageDuplicates); |
| 488 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, SetFaviconsDeleteBitmaps); | 490 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, SetFaviconsDeleteBitmaps); |
| 489 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, SetFaviconsReplaceBitmapData); | 491 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, SetFaviconsReplaceBitmapData); |
| 490 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, | 492 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, |
| 491 SetFaviconsSameFaviconURLForTwoPages); | 493 SetFaviconsSameFaviconURLForTwoPages); |
| 492 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, | 494 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, |
| 493 UpdateFaviconMappingsAndFetchNoChange); | 495 UpdateFaviconMappingsAndFetchNoChange); |
| 494 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MergeFaviconPageURLNotInDB); | 496 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MergeFaviconPageURLNotInDB); |
| 495 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MergeFaviconPageURLInDB); | 497 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MergeFaviconPageURLInDB); |
| 496 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MergeFaviconMaxFaviconsPerPage); | 498 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MergeFaviconMaxFaviconsPerPage); |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 | 688 |
| 687 // Maps the favicon ids in |icon_ids| to |page_url| (and all redirects) | 689 // Maps the favicon ids in |icon_ids| to |page_url| (and all redirects) |
| 688 // for |icon_type|. | 690 // for |icon_type|. |
| 689 // Returns true if the mappings for the page or any of its redirects were | 691 // Returns true if the mappings for the page or any of its redirects were |
| 690 // changed. | 692 // changed. |
| 691 bool SetFaviconMappingsForPageAndRedirects( | 693 bool SetFaviconMappingsForPageAndRedirects( |
| 692 const GURL& page_url, | 694 const GURL& page_url, |
| 693 favicon_base::IconType icon_type, | 695 favicon_base::IconType icon_type, |
| 694 const std::vector<favicon_base::FaviconID>& icon_ids); | 696 const std::vector<favicon_base::FaviconID>& icon_ids); |
| 695 | 697 |
| 698 // Maps the favicon ids in |icon_ids| to URLs in |page_urls| for |icon_type|. |
| 699 // Returns true if the function changed at least one of the |page_urls| |
| 700 // mappings. |
| 701 bool SetFaviconMappingsForPages( |
| 702 const std::vector<GURL>& page_urls, |
| 703 favicon_base::IconType icon_type, |
| 704 const std::vector<favicon_base::FaviconID>& icon_ids); |
| 705 |
| 696 // Maps the favicon ids in |icon_ids| to |page_url| for |icon_type|. | 706 // Maps the favicon ids in |icon_ids| to |page_url| for |icon_type|. |
| 697 // Returns true if the function changed some of |page_url|'s mappings. | 707 // Returns true if the function changed at least one of |page_url|'s mappings. |
| 698 bool SetFaviconMappingsForPage( | 708 bool SetFaviconMappingsForPage( |
| 699 const GURL& page_url, | 709 const GURL& page_url, |
| 700 favicon_base::IconType icon_type, | 710 favicon_base::IconType icon_type, |
| 701 const std::vector<favicon_base::FaviconID>& icon_ids); | 711 const std::vector<favicon_base::FaviconID>& icon_ids); |
| 702 | 712 |
| 703 // Returns all the page URLs in the redirect chain for |page_url|. If there | 713 // Returns all the page URLs in the redirect chain for |page_url|. If there |
| 704 // are no known redirects for |page_url|, returns a vector with |page_url|. | 714 // are no known redirects for |page_url|, returns a vector with |page_url|. |
| 705 void GetCachedRecentRedirects(const GURL& page_url, | 715 void GetCachedRecentRedirects(const GURL& page_url, |
| 706 RedirectList* redirect_list); | 716 RedirectList* redirect_list); |
| 707 | 717 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 | 844 |
| 835 // List of observers | 845 // List of observers |
| 836 base::ObserverList<HistoryBackendObserver> observers_; | 846 base::ObserverList<HistoryBackendObserver> observers_; |
| 837 | 847 |
| 838 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 848 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
| 839 }; | 849 }; |
| 840 | 850 |
| 841 } // namespace history | 851 } // namespace history |
| 842 | 852 |
| 843 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ | 853 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ |
| OLD | NEW |