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

Unified Diff: components/doodle/doodle_types.h

Issue 2710003006: [Doodle] Introduce a DoodleService (Closed)
Patch Set: comment 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
« no previous file with comments | « components/doodle/doodle_service_unittest.cc ('k') | components/doodle/doodle_types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
+ base::Time expiry_date;
+
+ // Copying and assignment allowed.
};
} // namespace doodle
« no previous file with comments | « components/doodle/doodle_service_unittest.cc ('k') | components/doodle/doodle_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698