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

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

Issue 2075153002: Reland of 'Move content/browser/power_save_blocker to //device/power_save_blocker' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missing libs for component mac 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
« no previous file with comments | « extensions/browser/api/power/power_api.cc ('k') | extensions/extensions.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..06e4d8f37b2eec7cb6780c239f7eb722479c77cf 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,24 @@ class PowerSaveBlockerStubManager {
private:
// Creates a new PowerSaveBlockerStub of type |type|.
- std::unique_ptr<content::PowerSaveBlocker> CreateStub(
- content::PowerSaveBlocker::PowerSaveBlockerType type,
- content::PowerSaveBlocker::Reason reason,
- const std::string& description) {
+ std::unique_ptr<device::PowerSaveBlocker> CreateStub(
+ device::PowerSaveBlocker::PowerSaveBlockerType type,
+ device::PowerSaveBlocker::Reason reason,
+ const std::string& description,
+ scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) {
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)));
}
« no previous file with comments | « extensions/browser/api/power/power_api.cc ('k') | extensions/extensions.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698