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

Unified Diff: content/browser/background_sync/background_sync_service_impl_unittest.cc

Issue 1617063002: [BackgroundSync Cleanup] Remove power observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Found more Created 4 years, 11 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: content/browser/background_sync/background_sync_service_impl_unittest.cc
diff --git a/content/browser/background_sync/background_sync_service_impl_unittest.cc b/content/browser/background_sync/background_sync_service_impl_unittest.cc
index 650c65709d55653949d954dbb2dbc50ed17017e3..21f312f123a081dd1f68aef91c4822e49d81651e 100644
--- a/content/browser/background_sync/background_sync_service_impl_unittest.cc
+++ b/content/browser/background_sync/background_sync_service_impl_unittest.cc
@@ -10,8 +10,6 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/memory/scoped_ptr.h"
-#include "base/power_monitor/power_monitor.h"
-#include "base/power_monitor/power_monitor_source.h"
#include "base/run_loop.h"
#include "content/browser/background_sync/background_sync_context_impl.h"
#include "content/browser/background_sync/background_sync_network_observer.h"
@@ -93,12 +91,6 @@ void ErrorAndRegistrationListCallback(
*out_array_size = registrations.size();
}
-class MockPowerMonitorSource : public base::PowerMonitorSource {
- private:
- // PowerMonitorSource overrides.
- bool IsOnBatteryPowerImpl() final { return false; }
-};
-
} // namespace
class BackgroundSyncServiceImplTest : public testing::Test {
@@ -151,9 +143,6 @@ class BackgroundSyncServiceImplTest : public testing::Test {
}
void CreateBackgroundSyncContext() {
- power_monitor_.reset(
- new base::PowerMonitor(make_scoped_ptr(new MockPowerMonitorSource())));
-
background_sync_context_ = new BackgroundSyncContextImpl();
background_sync_context_->Init(embedded_worker_helper_->context_wrapper());
@@ -245,7 +234,6 @@ class BackgroundSyncServiceImplTest : public testing::Test {
scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_;
scoped_ptr<EmbeddedWorkerTestHelper> embedded_worker_helper_;
scoped_ptr<StoragePartitionImpl> storage_partition_impl_;
- scoped_ptr<base::PowerMonitor> power_monitor_;
scoped_refptr<BackgroundSyncContextImpl> background_sync_context_;
int64_t sw_registration_id_;
scoped_refptr<ServiceWorkerRegistration> sw_registration_;

Powered by Google App Engine
This is Rietveld 408576698