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

Unified Diff: third_party/WebKit/Source/modules/push_messaging/PushSubscription.cpp

Issue 2864603003: Implement and ship PushSubscription.expirationTime (Closed)
Patch Set: mac results Created 3 years, 7 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
Index: third_party/WebKit/Source/modules/push_messaging/PushSubscription.cpp
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushSubscription.cpp b/third_party/WebKit/Source/modules/push_messaging/PushSubscription.cpp
index e6a113239c1644380a4f82232d2debc3e50f7039..930deeb8fb81ee4ce86c41dec3e8b64b2d46618d 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushSubscription.cpp
+++ b/third_party/WebKit/Source/modules/push_messaging/PushSubscription.cpp
@@ -46,6 +46,15 @@ PushSubscription::PushSubscription(
PushSubscription::~PushSubscription() {}
+DOMTimeStamp PushSubscription::expirationTime(bool& out_is_null) const {
+ // This attribute reflects the time at which the subscription will expire,
+ // which is not relevant to this implementation yet as subscription refreshes
+ // are not supported.
+ out_is_null = true;
+
+ return 0;
+}
+
DOMArrayBuffer* PushSubscription::getKey(const AtomicString& name) const {
if (name == "p256dh")
return p256dh_;
@@ -73,6 +82,7 @@ ScriptValue PushSubscription::toJSONForBinding(ScriptState* script_state) {
V8ObjectBuilder result(script_state);
result.AddString("endpoint", endpoint());
+ result.AddNull("expirationTime");
V8ObjectBuilder keys(script_state);
keys.Add("p256dh",

Powered by Google App Engine
This is Rietveld 408576698