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 27 matching lines...) Expand all Loading... |
38 | 38 |
39 #if defined(OS_ANDROID) | 39 #if defined(OS_ANDROID) |
40 class AndroidHistoryProviderService; | 40 class AndroidHistoryProviderService; |
41 #endif | 41 #endif |
42 | 42 |
43 class GURL; | 43 class GURL; |
44 class PageUsageData; | 44 class PageUsageData; |
45 class PageUsageRequest; | 45 class PageUsageRequest; |
46 class Profile; | 46 class Profile; |
47 struct ImportedFaviconUsage; | 47 struct ImportedFaviconUsage; |
| 48 class SkBitmap; |
48 | 49 |
49 namespace base { | 50 namespace base { |
50 class FilePath; | 51 class FilePath; |
51 class Thread; | 52 class Thread; |
52 } | 53 } |
53 | 54 |
54 namespace visitedlink { | 55 namespace visitedlink { |
55 class VisitedLinkMaster; | 56 class VisitedLinkMaster; |
56 } | 57 } |
57 | 58 |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 // favicon bitmaps of |pixel_size|. | 690 // favicon bitmaps of |pixel_size|. |
690 // For the example above, |bitmap_data| overwrites the 16x16 favicon | 691 // For the example above, |bitmap_data| overwrites the 16x16 favicon |
691 // bitmap for a.ico. | 692 // bitmap for a.ico. |
692 // TODO(pkotwicz): Remove once no longer required by sync. | 693 // TODO(pkotwicz): Remove once no longer required by sync. |
693 void MergeFavicon(const GURL& page_url, | 694 void MergeFavicon(const GURL& page_url, |
694 const GURL& icon_url, | 695 const GURL& icon_url, |
695 favicon_base::IconType icon_type, | 696 favicon_base::IconType icon_type, |
696 scoped_refptr<base::RefCountedMemory> bitmap_data, | 697 scoped_refptr<base::RefCountedMemory> bitmap_data, |
697 const gfx::Size& pixel_size); | 698 const gfx::Size& pixel_size); |
698 | 699 |
699 // Used by the FaviconService to set the favicons for a page on the history | 700 // Used by the FaviconService to replace all of the favicon bitmaps mapped to |
700 // backend. | 701 // |page_url| for |icon_type|. |
701 // |favicon_bitmap_data| replaces all the favicon bitmaps mapped to | 702 // Use MergeFavicon() if |bitmaps| is incomplete, and favicon bitmaps in the |
702 // |page_url|. | 703 // database should be preserved if possible. For instance, favicon bitmaps |
703 // |expired| and |icon_type| fields in FaviconBitmapData are ignored. | 704 // from sync are 1x only. MergeFavicon() is used to avoid deleting the 2x |
704 // Use MergeFavicon() if |favicon_bitmap_data| is incomplete, and favicon | 705 // favicon bitmap if it is present in the history backend. |
705 // bitmaps in the database should be preserved if possible. For instance, | |
706 // favicon bitmaps from sync are 1x only. MergeFavicon() is used to avoid | |
707 // deleting the 2x favicon bitmap if it is present in the history backend. | |
708 // See HistoryBackend::ValidateSetFaviconsParams() for more details on the | |
709 // criteria for |favicon_bitmap_data| to be valid. | |
710 void SetFavicons(const GURL& page_url, | 706 void SetFavicons(const GURL& page_url, |
711 favicon_base::IconType icon_type, | 707 favicon_base::IconType icon_type, |
712 const std::vector<favicon_base::FaviconRawBitmapData>& | 708 const GURL& icon_url, |
713 favicon_bitmap_data); | 709 const std::vector<SkBitmap>& bitmaps); |
714 | 710 |
715 // Used by the FaviconService to mark the favicon for the page as being out | 711 // Used by the FaviconService to mark the favicon for the page as being out |
716 // of date. | 712 // of date. |
717 void SetFaviconsOutOfDateForPage(const GURL& page_url); | 713 void SetFaviconsOutOfDateForPage(const GURL& page_url); |
718 | 714 |
719 // Used by the FaviconService to clone favicons from one page to another, | 715 // Used by the FaviconService to clone favicons from one page to another, |
720 // provided that other page does not already have favicons. | 716 // provided that other page does not already have favicons. |
721 void CloneFavicons(const GURL& old_page_url, const GURL& new_page_url); | 717 void CloneFavicons(const GURL& old_page_url, const GURL& new_page_url); |
722 | 718 |
723 // Used by the FaviconService for importing many favicons for many pages at | 719 // Used by the FaviconService for importing many favicons for many pages at |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; | 863 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; |
868 | 864 |
869 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; | 865 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; |
870 | 866 |
871 history::DeleteDirectiveHandler delete_directive_handler_; | 867 history::DeleteDirectiveHandler delete_directive_handler_; |
872 | 868 |
873 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 869 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
874 }; | 870 }; |
875 | 871 |
876 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 872 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
OLD | NEW |