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

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

Issue 958313002: [CleanUp] Move PowerApiManager to power_api and Rename (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 e4e0a07f592d28f1c815f5e83812991190febba8..38c7277dd3a934e672f183ac666cdc24b7b36601 100644
--- a/extensions/browser/api/power/power_api_unittest.cc
+++ b/extensions/browser/api/power/power_api_unittest.cc
@@ -12,7 +12,6 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "content/public/browser/power_save_blocker.h"
-#include "extensions/browser/api/power/power_api_manager.h"
#include "extensions/browser/api_test_utils.h"
#include "extensions/browser/api_unittest.h"
#include "extensions/common/extension.h"
@@ -56,7 +55,7 @@ class PowerSaveBlockerStub : public content::PowerSaveBlocker {
};
// Manages PowerSaveBlockerStub objects. Tests can instantiate this class
-// to make PowerApiManager's calls to create PowerSaveBlockers record the
+// to make PowerApi's calls to create PowerSaveBlockers record the
// actions that would've been performed instead of actually blocking and
// unblocking power management.
class PowerSaveBlockerStubManager {
@@ -66,14 +65,14 @@ class PowerSaveBlockerStubManager {
weak_ptr_factory_(this) {
// Use base::Unretained since callbacks with return values can't use
// weak pointers.
- PowerApiManager::Get(browser_context_)->SetCreateBlockerFunctionForTesting(
- base::Bind(&PowerSaveBlockerStubManager::CreateStub,
- base::Unretained(this)));
+ PowerApi::Get(browser_context_)
+ ->SetCreateBlockerFunctionForTesting(base::Bind(
+ &PowerSaveBlockerStubManager::CreateStub, base::Unretained(this)));
}
~PowerSaveBlockerStubManager() {
- PowerApiManager::Get(browser_context_)->SetCreateBlockerFunctionForTesting(
- PowerApiManager::CreateBlockerFunction());
+ PowerApi::Get(browser_context_)
+ ->SetCreateBlockerFunctionForTesting(PowerApi::CreateBlockerFunction());
}
// Removes and returns the first item from |requests_|. Returns NONE if
@@ -162,11 +161,12 @@ class PowerApiTest : public ApiUnitTest {
return api_test_utils::RunFunction(function.get(), args, browser_context());
}
- // Send a notification to PowerApiManager saying that |extension| has
+ // Send a notification to PowerApi saying that |extension| has
// been unloaded.
void UnloadExtension(const extensions::Extension* extension) {
- PowerApiManager::Get(browser_context())->OnExtensionUnloaded(
- browser_context(), extension, UnloadedExtensionInfo::REASON_UNINSTALL);
+ PowerApi::Get(browser_context())
+ ->OnExtensionUnloaded(browser_context(), extension,
+ UnloadedExtensionInfo::REASON_UNINSTALL);
}
scoped_ptr<PowerSaveBlockerStubManager> manager_;

Powered by Google App Engine
This is Rietveld 408576698