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

Unified Diff: public/platform/modules/background_sync/WebSyncRegistration.h

Issue 963683002: Add IDL and initial Blink API for Background Sync (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add OWNERS for platform/modules/background_sync Created 5 years, 9 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: public/platform/modules/background_sync/WebSyncRegistration.h
diff --git a/public/platform/modules/background_sync/WebSyncRegistration.h b/public/platform/modules/background_sync/WebSyncRegistration.h
index cd9cdc20013d995560e2105f8801a593c0b844d8..54195194c463cecb3194ad9c7dd3a5c872d76e44 100644
--- a/public/platform/modules/background_sync/WebSyncRegistration.h
+++ b/public/platform/modules/background_sync/WebSyncRegistration.h
@@ -10,7 +10,7 @@
namespace blink {
-struct WebSyncRegistrationOptions {
+struct WebSyncRegistration {
enum NetworkType {
NetworkTypeAny = 0,
NetworkTypeOffline,
@@ -19,30 +19,28 @@ struct WebSyncRegistrationOptions {
NetworkTypeLast = NetworkTypeNonMobile
};
- WebSyncRegistrationOptions(NetworkType networkType, bool allowOnBattery, bool idleRequired)
- : networkType(networkType)
+ WebSyncRegistration(const WebString& registrationId, unsigned long minDelay,
+ unsigned long maxDelay, unsigned long minPeriod, NetworkType minRequiredNetwork,
jochen (gone - plz use gerrit) 2015/03/13 14:39:03 what units do those delays have?
iclelland 2015/03/16 13:09:40 All are in milliseconds. (the suffix was removed f
+ bool allowOnBattery, bool idleRequired)
+ : id(registrationId)
+ , minDelay(minDelay)
+ , maxDelay(maxDelay)
+ , minPeriod(minPeriod)
+ , minRequiredNetwork(minRequiredNetwork)
, allowOnBattery(allowOnBattery)
, idleRequired(idleRequired)
{
}
- NetworkType networkType;
+ WebString id;
+ unsigned long minDelay;
+ unsigned long maxDelay;
+ unsigned long minPeriod;
+ NetworkType minRequiredNetwork;
bool allowOnBattery;
bool idleRequired;
};
-
-struct WebSyncRegistration {
- WebSyncRegistration(const WebString& registrationId, const WebSyncRegistrationOptions& options)
- : id(registrationId)
- , options(options)
- {
- }
-
- WebString id;
- WebSyncRegistrationOptions options;
-};
-
} // namespace blink
#endif // WebSyncRegistration_h

Powered by Google App Engine
This is Rietveld 408576698