summaryrefslogtreecommitdiffstats
path: root/extensions/browser/lazy_background_task_queue_unittest.cc
diff options
context:
space:
mode:
authorjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-08 19:15:21 +0000
committerjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-08 19:15:21 +0000
commit423f1fb38b61b9ecb94f7e64fc20e2a9969aaf95 (patch)
tree8ca74e89e9a59dada913d42ceeea17cdd8b0370d /extensions/browser/lazy_background_task_queue_unittest.cc
parent24ad156eab71b598312f9935e8e2e4a494567119 (diff)
downloadchromium_src-423f1fb38b61b9ecb94f7e64fc20e2a9969aaf95.zip
chromium_src-423f1fb38b61b9ecb94f7e64fc20e2a9969aaf95.tar.gz
chromium_src-423f1fb38b61b9ecb94f7e64fc20e2a9969aaf95.tar.bz2
Move ExtensionProcessManager to src/extensions, part 4
* Move c/b/extensions/extension_process_manager.h to extensions/browser/process_manager.h * Rename ExtensionsProcessManager to ProcessManager * Place it in the "extensions" namespace BUG=313481 TEST=browser_tests, unit_tests R=miket@chromium.org TBR=sky@chromium.org for mechanical header file move affecting chrome/browser/ Review URL: https://codereview.chromium.org/62713003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233956 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/browser/lazy_background_task_queue_unittest.cc')
-rw-r--r--extensions/browser/lazy_background_task_queue_unittest.cc30
1 files changed, 14 insertions, 16 deletions
diff --git a/extensions/browser/lazy_background_task_queue_unittest.cc b/extensions/browser/lazy_background_task_queue_unittest.cc
index e355cac..863a520 100644
--- a/extensions/browser/lazy_background_task_queue_unittest.cc
+++ b/extensions/browser/lazy_background_task_queue_unittest.cc
@@ -6,31 +6,30 @@
#include "base/bind.h"
#include "base/command_line.h"
-#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/extensions/extension_service_unittest.h"
#include "chrome/browser/extensions/test_extension_system.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/test/test_browser_thread_bundle.h"
+#include "extensions/browser/process_manager.h"
#include "extensions/common/extension_builder.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace extensions {
-// An ExtensionProcessManager that doesn't create background host pages.
-class TestExtensionProcessManager : public ExtensionProcessManager {
+// A ProcessManager that doesn't create background host pages.
+class TestProcessManager : public ProcessManager {
public:
- explicit TestExtensionProcessManager(Profile* profile)
- : ExtensionProcessManager(profile, profile->GetOriginalProfile()),
+ explicit TestProcessManager(Profile* profile)
+ : ProcessManager(profile, profile->GetOriginalProfile()),
create_count_(0) {}
- virtual ~TestExtensionProcessManager() {}
+ virtual ~TestProcessManager() {}
int create_count() { return create_count_; }
- // ExtensionProcessManager overrides:
- virtual extensions::ExtensionHost* CreateBackgroundHost(
- const extensions::Extension* extension,
- const GURL& url) OVERRIDE {
+ // ProcessManager overrides:
+ virtual ExtensionHost* CreateBackgroundHost(const Extension* extension,
+ const GURL& url) OVERRIDE {
// Don't actually try to create a web contents.
create_count_++;
return NULL;
@@ -39,7 +38,7 @@ class TestExtensionProcessManager : public ExtensionProcessManager {
private:
int create_count_;
- DISALLOW_COPY_AND_ASSIGN(TestExtensionProcessManager);
+ DISALLOW_COPY_AND_ASSIGN(TestProcessManager);
};
// Derives from ExtensionServiceTestBase because ExtensionService is difficult
@@ -96,7 +95,7 @@ class LazyBackgroundTaskQueueTest : public ExtensionServiceTestBase {
// Tests that only extensions with background pages should have tasks queued.
TEST_F(LazyBackgroundTaskQueueTest, ShouldEnqueueTask) {
InitializeEmptyExtensionService();
- InitializeExtensionProcessManager();
+ InitializeProcessManager();
LazyBackgroundTaskQueue queue(profile_.get());
@@ -114,14 +113,13 @@ TEST_F(LazyBackgroundTaskQueueTest, ShouldEnqueueTask) {
TEST_F(LazyBackgroundTaskQueueTest, AddPendingTask) {
InitializeEmptyExtensionService();
- // Swap in our stub TestExtensionProcessManager.
+ // Swap in our stub TestProcessManager.
TestExtensionSystem* extension_system =
static_cast<extensions::TestExtensionSystem*>(
ExtensionSystem::Get(profile_.get()));
// Owned by |extension_system|.
- TestExtensionProcessManager* process_manager =
- new TestExtensionProcessManager(profile_.get());
- extension_system->SetExtensionProcessManager(process_manager);
+ TestProcessManager* process_manager = new TestProcessManager(profile_.get());
+ extension_system->SetProcessManager(process_manager);
LazyBackgroundTaskQueue queue(profile_.get());