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

Unified Diff: components/search_provider_logos/logo_tracker.cc

Issue 1088583005: Fix metadata loss when revalidating search provider logo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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: components/search_provider_logos/logo_tracker.cc
diff --git a/components/search_provider_logos/logo_tracker.cc b/components/search_provider_logos/logo_tracker.cc
index 0b606872b041db56da59de80f8f5f6deccd6cb13..855fe1e589b67813cb49e3ef2a4e293611b3c583 100644
--- a/components/search_provider_logos/logo_tracker.cc
+++ b/components/search_provider_logos/logo_tracker.cc
@@ -243,6 +243,8 @@ void LogoTracker::OnFreshLogoAvailable(scoped_ptr<EncodedLogo> encoded_logo,
encoded_logo->metadata.fingerprint ==
cached_logo_->metadata.fingerprint) {
// The cached logo was revalidated, i.e. its fingerprint was verified.
+ // mime_type isn't sent when revalidating, so copy it from the cached logo.
+ encoded_logo->metadata.mime_type = cached_logo_->metadata.mime_type;
SetCachedMetadata(encoded_logo->metadata);
} else if (encoded_logo && image.isNull()) {
// Image decoding failed. Do nothing.
« no previous file with comments | « components/search_provider_logos/google_logo_api.cc ('k') | components/search_provider_logos/logo_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698