Chromium Code Reviews| 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|, because that is | |
| 20 // computed as "now + time_to_live", so it'll never be exactly the same. | |
|
fhorschig
2017/02/27 17:44:07
s/so/because? (or 'otherwise'?)
Marc Treib
2017/02/28 10:25:49
"it" was supposed to refer to the expiry date. Ref
| |
| 21 return doodle_type == other.doodle_type && alt_text == other.alt_text && | |
| 22 interactive_html == other.interactive_html && | |
| 23 search_url == other.search_url && target_url == other.target_url && | |
| 24 fullpage_interactive_url == other.fullpage_interactive_url && | |
| 25 large_image == other.large_image && | |
| 26 large_cta_image == other.large_cta_image && | |
| 27 transparent_large_image == other.transparent_large_image; | |
| 28 } | |
| 29 | |
| 30 } // namespace doodle | |
| OLD | NEW |