Chromium Code Reviews| Index: components/doodle/doodle_types.h |
| diff --git a/components/doodle/doodle_types.h b/components/doodle/doodle_types.h |
| index a4d92ff6c4d070f02a97ee9b03c1685d17f2ecca..49c749d8babfed56a44e64553a1c93cbcf2faedf 100644 |
| --- a/components/doodle/doodle_types.h |
| +++ b/components/doodle/doodle_types.h |
| @@ -5,6 +5,7 @@ |
| #ifndef COMPONENTS_DOODLE_DOODLE_TYPES_H_ |
| #define COMPONENTS_DOODLE_DOODLE_TYPES_H_ |
| +#include "base/time/time.h" |
| #include "url/gurl.h" |
| namespace doodle { |
| @@ -32,6 +33,9 @@ struct DoodleImage { |
| DoodleImage(); |
| ~DoodleImage(); |
| + bool operator==(const DoodleImage& other) const; |
| + bool operator!=(const DoodleImage& other) const; |
| + |
| GURL url; |
| int height; |
| int width; |
| @@ -48,11 +52,14 @@ struct DoodleConfig { |
| DoodleConfig(const DoodleConfig& config); // = default; |
| ~DoodleConfig(); |
| + // Checks whether this config is "equivalent" to the other. This compares all |
| + // fields for equality, except for |expiry_date|. |
| + bool IsEquivalent(const DoodleConfig& other) const; |
| + |
| DoodleType doodle_type; |
| std::string alt_text; |
| std::string interactive_html; |
| - base::Time expiry_date; |
| GURL search_url; |
| GURL target_url; |
| GURL fullpage_interactive_url; |
| @@ -60,6 +67,11 @@ struct DoodleConfig { |
| DoodleImage large_image; |
| DoodleImage large_cta_image; |
| DoodleImage transparent_large_image; |
| + |
| + // TODO(treib,fhorschig): Don't expose this? Clients don't care about it. |
|
fhorschig
2017/02/27 17:44:07
What do you think of?
private member with friend c
Marc Treib
2017/02/28 10:25:49
Nothing that I'd be very happy with, yet.
fhorschig
2017/02/28 10:48:09
Sounds reasonable. We should decide that when we a
|
| + base::Time expiry_date; |
| + |
| + // Copying and assignment allowed. |
| }; |
| } // namespace doodle |