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

Unified Diff: chrome/browser/ui/webui/session_favicon_source.cc

Issue 11762004: Make favicons for about:history and about:bookmarks switch from lodpi to hidpi when dragging browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/session_favicon_source.cc
diff --git a/chrome/browser/ui/webui/session_favicon_source.cc b/chrome/browser/ui/webui/session_favicon_source.cc
index 6d8b5cd99f78adf36d4c591c059fdecc91c4fe29..70591e7cb1ed6a42200bb8feaddad672bfd63919 100644
--- a/chrome/browser/ui/webui/session_favicon_source.cc
+++ b/chrome/browser/ui/webui/session_favicon_source.cc
@@ -20,26 +20,6 @@ SessionFaviconSource::SessionFaviconSource(Profile* profile)
SessionFaviconSource::~SessionFaviconSource() {
}
-void SessionFaviconSource::StartDataRequest(const std::string& path,
- bool is_incognito,
- int request_id) {
- ProfileSyncService* sync_service =
- ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile_);
- SessionModelAssociator* associator = sync_service ?
- sync_service->GetSessionModelAssociator() : NULL;
-
- std::string favicon_data;
- if (associator &&
- associator->GetSyncedFaviconForPageURL(path, &favicon_data)) {
- scoped_refptr<base::RefCountedString> response =
- new base::RefCountedString();
- response->data() = favicon_data;
- SendResponse(request_id, response);
- } else {
- FaviconSource::StartDataRequest(path, is_incognito, request_id);
- }
-}
-
std::string SessionFaviconSource::GetMimeType(const std::string&) const {
return "image/png";
}
@@ -55,3 +35,22 @@ bool SessionFaviconSource::AllowCaching() const {
// update in a timely manner.
return false;
}
+
+bool SessionFaviconSource::HandleMissingResource(const IconRequest& request) {
+ ProfileSyncService* sync_service =
+ ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile_);
+ SessionModelAssociator* associator = sync_service ?
+ sync_service->GetSessionModelAssociator() : NULL;
+
+ std::string favicon_data;
+ if (associator &&
+ associator->GetSyncedFaviconForPageURL(request.request_path,
+ &favicon_data)) {
+ scoped_refptr<base::RefCountedString> response =
+ new base::RefCountedString();
+ response->data() = favicon_data;
+ SendResponse(request.request_id, response);
+ return true;
+ }
+ return false;
+}

Powered by Google App Engine
This is Rietveld 408576698