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

Side by Side Diff: chrome/browser/ui/ash/launcher/launcher_favicon_loader.cc

Issue 934693002: Reload favicon from HTTP cache on Ctrl+Refresh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
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 #include "chrome/browser/ui/ash/launcher/launcher_favicon_loader.h" 5 #include "chrome/browser/ui/ash/launcher/launcher_favicon_loader.h"
6 6
7 #include "ash/shelf/shelf_constants.h" 7 #include "ash/shelf/shelf_constants.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Request any new urls. 100 // Request any new urls.
101 for (std::set<GURL>::iterator iter = urls.begin(); 101 for (std::set<GURL>::iterator iter = urls.begin();
102 iter != urls.end(); ++iter) { 102 iter != urls.end(); ++iter) {
103 if (processed_requests_.find(*iter) != processed_requests_.end()) 103 if (processed_requests_.find(*iter) != processed_requests_.end())
104 continue; // Skip already processed downloads. 104 continue; // Skip already processed downloads.
105 if (pending_requests_.find(*iter) != pending_requests_.end()) 105 if (pending_requests_.find(*iter) != pending_requests_.end())
106 continue; // Skip already pending downloads. 106 continue; // Skip already pending downloads.
107 pending_requests_.insert(*iter); 107 pending_requests_.insert(*iter);
108 web_contents()->DownloadImage( 108 web_contents()->DownloadImage(
109 *iter, 109 *iter,
110 true, // is a favicon 110 true, // is a favicon
111 0, // no maximum size 111 0, // no maximum size
112 false, // normal cache policy
112 base::Bind(&FaviconRawBitmapHandler::DidDownloadFavicon, 113 base::Bind(&FaviconRawBitmapHandler::DidDownloadFavicon,
113 weak_ptr_factory_.GetWeakPtr())); 114 weak_ptr_factory_.GetWeakPtr()));
114 } 115 }
115 } 116 }
116 117
117 bool FaviconRawBitmapHandler::HasPendingDownloads() const { 118 bool FaviconRawBitmapHandler::HasPendingDownloads() const {
118 return !pending_requests_.empty(); 119 return !pending_requests_.empty();
119 } 120 }
120 121
121 void FaviconRawBitmapHandler::DidDownloadFavicon( 122 void FaviconRawBitmapHandler::DidDownloadFavicon(
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 LauncherFaviconLoader::~LauncherFaviconLoader() { 169 LauncherFaviconLoader::~LauncherFaviconLoader() {
169 } 170 }
170 171
171 SkBitmap LauncherFaviconLoader::GetFavicon() const { 172 SkBitmap LauncherFaviconLoader::GetFavicon() const {
172 return favicon_handler_->bitmap(); 173 return favicon_handler_->bitmap();
173 } 174 }
174 175
175 bool LauncherFaviconLoader::HasPendingDownloads() const { 176 bool LauncherFaviconLoader::HasPendingDownloads() const {
176 return favicon_handler_->HasPendingDownloads(); 177 return favicon_handler_->HasPendingDownloads();
177 } 178 }
OLDNEW
« no previous file with comments | « chrome/browser/favicon/favicon_tab_helper_browsertest.cc ('k') | chrome/browser/ui/metro_pin_tab_helper_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698