| Index: content/browser/background_sync/background_sync_manager.cc
|
| diff --git a/content/browser/background_sync/background_sync_manager.cc b/content/browser/background_sync/background_sync_manager.cc
|
| index 0f7fbcb6483ab2ab68be45d5f29314c388c9c6cb..b10978dde30e5412951fab805c921d8af67b644d 100644
|
| --- a/content/browser/background_sync/background_sync_manager.cc
|
| +++ b/content/browser/background_sync/background_sync_manager.cc
|
| @@ -15,7 +15,6 @@
|
| #include "build/build_config.h"
|
| #include "content/browser/background_sync/background_sync_metrics.h"
|
| #include "content/browser/background_sync/background_sync_network_observer.h"
|
| -#include "content/browser/background_sync/background_sync_power_observer.h"
|
| #include "content/browser/background_sync/background_sync_registration_handle.h"
|
| #include "content/browser/background_sync/background_sync_registration_options.h"
|
| #include "content/browser/service_worker/service_worker_context_wrapper.h"
|
| @@ -316,8 +315,6 @@ BackgroundSyncManager::BackgroundSyncManager(
|
| base::Bind(&BackgroundSyncManager::OnNetworkChanged,
|
| weak_ptr_factory_.GetWeakPtr())));
|
| #endif
|
| - power_observer_.reset(new BackgroundSyncPowerObserver(base::Bind(
|
| - &BackgroundSyncManager::OnPowerChanged, weak_ptr_factory_.GetWeakPtr())));
|
| }
|
|
|
| void BackgroundSyncManager::Init() {
|
| @@ -413,7 +410,6 @@ void BackgroundSyncManager::InitDidGetDataFromBackend(
|
| options->periodicity = registration_proto.periodicity();
|
| options->min_period = registration_proto.min_period();
|
| options->network_state = registration_proto.network_state();
|
| - options->power_state = registration_proto.power_state();
|
|
|
| registration->set_id(registration_proto.id());
|
| registration->set_num_attempts(registration_proto.num_attempts());
|
| @@ -674,7 +670,6 @@ void BackgroundSyncManager::StoreRegistrations(
|
| registration_proto->set_min_period(registration.options()->min_period);
|
| registration_proto->set_network_state(
|
| registration.options()->network_state);
|
| - registration_proto->set_power_state(registration.options()->power_state);
|
| registration_proto->set_num_attempts(registration.num_attempts());
|
| registration_proto->set_delay_until(
|
| registration.delay_until().ToInternalValue());
|
| @@ -1075,8 +1070,7 @@ void BackgroundSyncManager::GetRegistrationsImpl(
|
| bool BackgroundSyncManager::AreOptionConditionsMet(
|
| const BackgroundSyncRegistrationOptions& options) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| - return network_observer_->NetworkSufficient(options.network_state) &&
|
| - power_observer_->PowerSufficient(options.power_state);
|
| + return network_observer_->NetworkSufficient(options.network_state);
|
| }
|
|
|
| bool BackgroundSyncManager::IsRegistrationReadyToFire(
|
| @@ -1455,12 +1449,6 @@ void BackgroundSyncManager::OnNetworkChanged() {
|
| FireReadyEvents();
|
| }
|
|
|
| -void BackgroundSyncManager::OnPowerChanged() {
|
| - DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| -
|
| - FireReadyEvents();
|
| -}
|
| -
|
| void BackgroundSyncManager::SetMaxSyncAttemptsImpl(
|
| int max_attempts,
|
| const base::Closure& callback) {
|
|
|