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

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: Rebase! 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/17 12:25:35 even if the idl doesn't have units, I think we sho
iclelland 2015/03/19 13:13:43 I'll add this as "millis" (By analogy with Java's
+ bool allowOnBattery, bool idleRequired)
+ : id(registrationId)
+ , minDelay(minDelay)
+ , maxDelay(maxDelay)
+ , minPeriod(minPeriod)
+ , minRequiredNetwork(minRequiredNetwork)
, allowOnBattery(allowOnBattery)
, idleRequired(idleRequired)
{
jochen (gone - plz use gerrit) 2015/03/17 12:25:35 what about adding an assert that minDelay <= maxDe
iclelland 2015/03/19 13:13:43 I suppose the actual constraint would be (minDelay
}
- 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
« public/platform/Platform.h ('K') | « public/platform/modules/background_sync/WebSyncProvider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698