Index: content/browser/background_sync/background_sync_manager.h |
diff --git a/content/browser/background_sync/background_sync_manager.h b/content/browser/background_sync/background_sync_manager.h |
index 2ba2da157216339e53e02e97f9e26398b9be60be..2a21241673935be400326a8de813d97f481ed4bb 100644 |
--- a/content/browser/background_sync/background_sync_manager.h |
+++ b/content/browser/background_sync/background_sync_manager.h |
@@ -11,6 +11,7 @@ |
#include "base/callback_forward.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/memory/weak_ptr.h" |
+#include "content/browser/background_sync/background_sync.pb.h" |
#include "content/browser/cache_storage/cache_storage_scheduler.h" |
#include "content/browser/service_worker/service_worker_context_observer.h" |
#include "content/browser/service_worker/service_worker_storage.h" |
@@ -51,21 +52,26 @@ class CONTENT_EXPORT BackgroundSyncManager |
struct CONTENT_EXPORT BackgroundSyncRegistration { |
using RegistrationId = int64; |
static const RegistrationId kInvalidRegistrationId; |
- |
BackgroundSyncRegistration() |
- : BackgroundSyncRegistration(kInvalidRegistrationId, "") {} |
- explicit BackgroundSyncRegistration(const std::string& name) |
- : BackgroundSyncRegistration(kInvalidRegistrationId, name) {} |
- BackgroundSyncRegistration(int64 id, const std::string& name) |
- : id(id), min_period(0), name(name) {} |
+ : id(kInvalidRegistrationId), |
johnme
2015/04/07 17:05:12
Nit: easier to read if you remove this constructor
jkarlin
2015/04/07 17:55:06
Done.
|
+ fire_once(true), |
+ min_period(0), |
+ network_state(NETWORK_STATE_ONLINE), |
+ power_state(POWER_STATE_AVOID_DRAINING) {} |
bool Equals(const BackgroundSyncRegistration& other) { |
- return this->name == other.name && this->min_period == other.min_period; |
+ return this->name == other.name && this->fire_once == other.fire_once && |
+ this->min_period == other.min_period && |
+ network_state == other.network_state && |
+ power_state == other.power_state; |
} |
RegistrationId id; |
- int64 min_period; |
std::string name; |
+ bool fire_once; |
+ int64 min_period; |
+ SyncNetworkState network_state; |
+ SyncPowerState power_state; |
}; |
struct CONTENT_EXPORT BackgroundSyncRegistrations { |