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

Unified Diff: components/doodle/doodle_types.cc

Issue 2726883002: [Doodle] Replace the expiry_date in DoodleConfig by time_to_live (Closed)
Patch Set: Created 3 years, 10 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/doodle/doodle_types.cc
diff --git a/components/doodle/doodle_types.cc b/components/doodle/doodle_types.cc
index c0a1dffde8b2ae79f784ee5f294b67a6c07fe3ac..e74356a51497929652e3281b39095893154e23ea 100644
--- a/components/doodle/doodle_types.cc
+++ b/components/doodle/doodle_types.cc
@@ -16,10 +16,9 @@ bool DoodleImage::operator!=(const DoodleImage& other) const {
}
bool DoodleConfig::IsEquivalent(const DoodleConfig& other) const {
- // Note: This compares all fields except for |expiry_date|. The reason is that
- // |expiry_date| gets computed as "now + time_to_live", so when an identical
- // config gets re-fetched, the expiry date will generally end up slightly
- // different.
+ // Note: This compares all fields except for |time_to_live|, which by
+ // definition isn't constant over time, and shouldn't be here in the first
+ // place.
fhorschig 2017/03/01 15:40:52 What do you mean by "shouldn't be here in the firs
Marc Treib 2017/03/02 09:28:03 In the config. Made that clear in the comment.
return doodle_type == other.doodle_type && alt_text == other.alt_text &&
interactive_html == other.interactive_html &&
search_url == other.search_url && target_url == other.target_url &&
« components/doodle/doodle_fetcher_impl_unittest.cc ('K') | « components/doodle/doodle_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698