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

Unified Diff: content/public/common/manifest.cc

Issue 2637003002: Add share_target field to Manifest. (Closed)
Patch Set: Changed share_target type to base::Optional, and fixed tests, according to feedback. Created 3 years, 11 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 | « content/public/common/manifest.h ('k') | content/renderer/manifest/manifest_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/manifest.cc
diff --git a/content/public/common/manifest.cc b/content/public/common/manifest.cc
index 8e09aad2e71ea9aa86f681d7df267f2dbbddb09c..166c268e928fc6a55346796de9209e000baf3504 100644
--- a/content/public/common/manifest.cc
+++ b/content/public/common/manifest.cc
@@ -14,22 +14,23 @@ const int64_t Manifest::kInvalidOrMissingColor =
static_cast<int64_t>(std::numeric_limits<int32_t>::max()) + 1;
const size_t Manifest::kMaxIPCStringLength = 4 * 1024;
-Manifest::Icon::Icon() { }
+Manifest::Icon::Icon() = default;
Manifest::Icon::Icon(const Icon& other) = default;
-Manifest::Icon::~Icon() {
-}
+Manifest::Icon::~Icon() = default;
bool Manifest::Icon::operator==(const Manifest::Icon& other) const {
return src == other.src && type == other.type && sizes == other.sizes;
}
-Manifest::RelatedApplication::RelatedApplication() {
-}
+Manifest::ShareTarget::ShareTarget() = default;
-Manifest::RelatedApplication::~RelatedApplication() {
-}
+Manifest::ShareTarget::~ShareTarget() = default;
+
+Manifest::RelatedApplication::RelatedApplication() = default;
+
+Manifest::RelatedApplication::~RelatedApplication() = default;
Manifest::Manifest()
: display(blink::WebDisplayModeUndefined),
@@ -37,12 +38,12 @@ Manifest::Manifest()
prefer_related_applications(false),
theme_color(Manifest::kInvalidOrMissingColor),
background_color(Manifest::kInvalidOrMissingColor) {
+ share_target = base::nullopt;
}
Manifest::Manifest(const Manifest& other) = default;
-Manifest::~Manifest() {
-}
+Manifest::~Manifest() = default;
bool Manifest::IsEmpty() const {
return name.is_null() &&
@@ -51,6 +52,7 @@ bool Manifest::IsEmpty() const {
display == blink::WebDisplayModeUndefined &&
orientation == blink::WebScreenOrientationLockDefault &&
icons.empty() &&
+ !share_target.has_value() &&
related_applications.empty() &&
!prefer_related_applications &&
theme_color == Manifest::kInvalidOrMissingColor &&
« no previous file with comments | « content/public/common/manifest.h ('k') | content/renderer/manifest/manifest_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698