Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: components/ntp_tiles/icon_cacher_impl.h

Issue 2888393002: [Icon cacher] Add metrics for downloading favicons for NTP Tiles (Closed)
Patch Set: Robert's comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | components/ntp_tiles/icon_cacher_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_NTP_TILES_ICON_CACHER_IMPL_H_ 5 #ifndef COMPONENTS_NTP_TILES_ICON_CACHER_IMPL_H_
6 #define COMPONENTS_NTP_TILES_ICON_CACHER_IMPL_H_ 6 #define COMPONENTS_NTP_TILES_ICON_CACHER_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 void SaveAndNotifyDefaultIconForSite( 76 void SaveAndNotifyDefaultIconForSite(
77 const PopularSites::Site& site, 77 const PopularSites::Site& site,
78 const base::Closure& preliminary_icon_available, 78 const base::Closure& preliminary_icon_available,
79 const gfx::Image& image); 79 const gfx::Image& image);
80 void SaveIconForSite(const PopularSites::Site& site, const gfx::Image& image); 80 void SaveIconForSite(const PopularSites::Site& site, const gfx::Image& image);
81 81
82 void OnGetLargeIconOrFallbackStyleFinished( 82 void OnGetLargeIconOrFallbackStyleFinished(
83 const GURL& page_url, 83 const GURL& page_url,
84 const favicon_base::LargeIconResult& result); 84 const favicon_base::LargeIconResult& result);
85 85
86 void OnMostLikelyFaviconDownloaded(const GURL& request_url, bool success);
87
86 bool StartRequest(const GURL& request_url, 88 bool StartRequest(const GURL& request_url,
87 const base::Closure& icon_available); 89 const base::Closure& icon_available);
88 void FinishRequestAndNotifyIconAvailable(const GURL& request_url, 90 void FinishRequestAndNotifyIconAvailable(const GURL& request_url,
89 bool newly_available); 91 bool newly_available);
90 92
91 base::CancelableTaskTracker tracker_; 93 base::CancelableTaskTracker tracker_;
92 favicon::FaviconService* const favicon_service_; 94 favicon::FaviconService* const favicon_service_;
93 favicon::LargeIconService* const large_icon_service_; 95 favicon::LargeIconService* const large_icon_service_;
94 std::unique_ptr<image_fetcher::ImageFetcher> const image_fetcher_; 96 std::unique_ptr<image_fetcher::ImageFetcher> const image_fetcher_;
95 std::map<GURL, std::vector<base::Closure>> in_flight_requests_; 97 std::map<GURL, std::vector<base::Closure>> in_flight_requests_;
96 98
97 base::WeakPtrFactory<IconCacherImpl> weak_ptr_factory_; 99 base::WeakPtrFactory<IconCacherImpl> weak_ptr_factory_;
98 100
99 DISALLOW_COPY_AND_ASSIGN(IconCacherImpl); 101 DISALLOW_COPY_AND_ASSIGN(IconCacherImpl);
100 }; 102 };
101 103
102 } // namespace ntp_tiles 104 } // namespace ntp_tiles
103 105
104 #endif // COMPONENTS_NTP_TILES_ICON_CACHER_IMPL_H_ 106 #endif // COMPONENTS_NTP_TILES_ICON_CACHER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | components/ntp_tiles/icon_cacher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698