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

Unified Diff: components/search_provider_logos/google_logo_api.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
« no previous file with comments | « no previous file | components/search_provider_logos/logo_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/search_provider_logos/google_logo_api.cc
diff --git a/components/search_provider_logos/google_logo_api.cc b/components/search_provider_logos/google_logo_api.cc
index 0e7501fde21dc45e978fc6d9a647535fa5a3e1ee..f92e6797cc0557a6cefffee6233b14cb8f5a927c 100644
--- a/components/search_provider_logos/google_logo_api.cc
+++ b/components/search_provider_logos/google_logo_api.cc
@@ -94,10 +94,6 @@ scoped_ptr<EncodedLogo> GoogleParseLogoResponse(
logo->encoded_image = encoded_image_string;
if (!logo_dict->GetString("mime_type", &logo->metadata.mime_type))
return scoped_ptr<EncodedLogo>();
-
- // Existance of url indicates |data| is a call to action image for an
- // animated doodle. |url| points to that animated doodle.
- logo_dict->GetString("url", &logo->metadata.animated_url);
}
// Don't check return values since these fields are optional.
@@ -105,6 +101,10 @@ scoped_ptr<EncodedLogo> GoogleParseLogoResponse(
logo_dict->GetString("fingerprint", &logo->metadata.fingerprint);
logo_dict->GetString("alt", &logo->metadata.alt_text);
+ // Existance of url indicates |data| is a call to action image for an
+ // animated doodle. |url| points to that animated doodle.
+ logo_dict->GetString("url", &logo->metadata.animated_url);
+
base::TimeDelta time_to_live;
int time_to_live_ms;
if (logo_dict->GetInteger("time_to_live", &time_to_live_ms)) {
« no previous file with comments | « no previous file | components/search_provider_logos/logo_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698