| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/doodle/doodle_types.h" |
| 6 |
| 7 namespace doodle { |
| 8 |
| 9 bool DoodleImage::operator==(const DoodleImage& other) const { |
| 10 return url == other.url && height == other.height && width == other.width && |
| 11 is_animated_gif == other.is_animated_gif && is_cta == other.is_cta; |
| 12 } |
| 13 |
| 14 bool DoodleImage::operator!=(const DoodleImage& other) const { |
| 15 return !(*this == other); |
| 16 } |
| 17 |
| 18 bool DoodleConfig::IsEquivalent(const DoodleConfig& other) const { |
| 19 // Note: This compares all fields except for |expiry_date|. The reason is that |
| 20 // |expiry_date| gets computed as "now + time_to_live", so when an identical |
| 21 // config gets re-fetched, the expiry date will generally end up slightly |
| 22 // different. |
| 23 return doodle_type == other.doodle_type && alt_text == other.alt_text && |
| 24 interactive_html == other.interactive_html && |
| 25 search_url == other.search_url && target_url == other.target_url && |
| 26 fullpage_interactive_url == other.fullpage_interactive_url && |
| 27 large_image == other.large_image && |
| 28 large_cta_image == other.large_cta_image && |
| 29 transparent_large_image == other.transparent_large_image; |
| 30 } |
| 31 |
| 32 } // namespace doodle |
| OLD | NEW |