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

Unified Diff: extensions/browser/api/power/power_api_unittest.cc

Issue 1999953002: Move content/browser/power_save_blocker to //device/power_save_blocker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@power-save-next-2
Patch Set: . Created 4 years, 6 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: extensions/browser/api/power/power_api_unittest.cc
diff --git a/extensions/browser/api/power/power_api_unittest.cc b/extensions/browser/api/power/power_api_unittest.cc
index 54b8403d9e42ed92388f68b215a5e987fd82f776..6350bf2ecf14fd831d26e9b22b0ba19a240065e1 100644
--- a/extensions/browser/api/power/power_api_unittest.cc
+++ b/extensions/browser/api/power/power_api_unittest.cc
@@ -11,7 +11,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
-#include "content/public/browser/power_save_blocker.h"
+#include "device/power_save_blocker/power_save_blocker.h"
#include "extensions/browser/api_test_utils.h"
#include "extensions/browser/api_unittest.h"
#include "extensions/common/extension.h"
@@ -38,9 +38,9 @@ enum Request {
NONE,
};
-// Stub implementation of content::PowerSaveBlocker that just runs a
-// callback on destruction.
-class PowerSaveBlockerStub : public content::PowerSaveBlocker {
+// Stub implementation of device::PowerSaveBlocker that just runs a callback on
+// destruction.
+class PowerSaveBlockerStub : public device::PowerSaveBlocker {
public:
explicit PowerSaveBlockerStub(base::Closure unblock_callback)
: unblock_callback_(unblock_callback) {
@@ -88,22 +88,22 @@ class PowerSaveBlockerStubManager {
private:
// Creates a new PowerSaveBlockerStub of type |type|.
- std::unique_ptr<content::PowerSaveBlocker> CreateStub(
- content::PowerSaveBlocker::PowerSaveBlockerType type,
- content::PowerSaveBlocker::Reason reason,
+ std::unique_ptr<device::PowerSaveBlocker> CreateStub(
+ device::PowerSaveBlocker::PowerSaveBlockerType type,
+ device::PowerSaveBlocker::Reason reason,
const std::string& description) {
Request unblock_request = NONE;
switch (type) {
- case content::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension:
+ case device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension:
requests_.push_back(BLOCK_APP_SUSPENSION);
unblock_request = UNBLOCK_APP_SUSPENSION;
break;
- case content::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep:
+ case device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep:
requests_.push_back(BLOCK_DISPLAY_SLEEP);
unblock_request = UNBLOCK_DISPLAY_SLEEP;
break;
}
- return std::unique_ptr<content::PowerSaveBlocker>(new PowerSaveBlockerStub(
+ return std::unique_ptr<device::PowerSaveBlocker>(new PowerSaveBlockerStub(
base::Bind(&PowerSaveBlockerStubManager::AppendRequest,
weak_ptr_factory_.GetWeakPtr(), unblock_request)));
}

Powered by Google App Engine
This is Rietveld 408576698