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

Unified Diff: chrome/browser/extensions/lazy_background_page_apitest.cc

Issue 671763002: Extract ProcessManager from ExtensionSystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 6 years, 2 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 | « chrome/browser/extensions/gpu_browsertest.cc ('k') | chrome/browser/extensions/notifications_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/lazy_background_page_apitest.cc
diff --git a/chrome/browser/extensions/lazy_background_page_apitest.cc b/chrome/browser/extensions/lazy_background_page_apitest.cc
index 509db41f34b21e808250ece5991507c653814c3a..5abc7562673c25299a89f853d793a93f1ccc58f1 100644
--- a/chrome/browser/extensions/lazy_background_page_apitest.cc
+++ b/chrome/browser/extensions/lazy_background_page_apitest.cc
@@ -8,7 +8,6 @@
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/extensions/browser_action_test_util.h"
#include "chrome/browser/extensions/extension_apitest.h"
-#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/lazy_background_page_test_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
@@ -26,7 +25,6 @@
#include "extensions/browser/extension_host.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_registry_observer.h"
-#include "extensions/browser/extension_system.h"
#include "extensions/browser/process_manager.h"
#include "extensions/common/extension.h"
#include "extensions/test/extension_test_message_listener.h"
@@ -107,8 +105,8 @@ class LazyBackgroundPageApiTest : public ExtensionApiTest {
// Returns true if the lazy background page for the extension with
// |extension_id| is still running.
bool IsBackgroundPageAlive(const std::string& extension_id) {
- extensions::ProcessManager* pm = extensions::ExtensionSystem::Get(
- browser()->profile())->process_manager();
+ extensions::ProcessManager* pm =
+ extensions::ProcessManager::Get(browser()->profile());
return pm->GetBackgroundHostForExtension(extension_id);
}
@@ -226,7 +224,7 @@ IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, WaitForDialog) {
// Close the dialog. The keep alive count is decremented.
extensions::ProcessManager* pm =
- extensions::ExtensionSystem::Get(browser()->profile())->process_manager();
+ extensions::ProcessManager::Get(browser()->profile());
int previous_keep_alive_count = pm->GetLazyKeepaliveCount(extension);
dialog->CloseModalDialog();
EXPECT_EQ(previous_keep_alive_count - 1,
@@ -282,7 +280,7 @@ IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, WaitForRequest) {
// Lazy Background Page still exists, because the extension started a request.
extensions::ProcessManager* pm =
- extensions::ExtensionSystem::Get(browser()->profile())->process_manager();
+ extensions::ProcessManager::Get(browser()->profile());
extensions::ExtensionHost* host =
pm->GetBackgroundHostForExtension(last_loaded_extension_id());
ASSERT_TRUE(host);
@@ -350,10 +348,9 @@ IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, DISABLED_IncognitoSplitMode) {
// Lazy Background Page doesn't exist yet.
extensions::ProcessManager* pm =
- extensions::ExtensionSystem::Get(browser()->profile())->process_manager();
+ extensions::ProcessManager::Get(browser()->profile());
extensions::ProcessManager* pmi =
- extensions::ExtensionSystem::Get(incognito_browser->profile())->
- process_manager();
+ extensions::ProcessManager::Get(incognito_browser->profile());
EXPECT_FALSE(pm->GetBackgroundHostForExtension(last_loaded_extension_id()));
EXPECT_FALSE(pmi->GetBackgroundHostForExtension(last_loaded_extension_id()));
@@ -440,7 +437,7 @@ IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, ImpulseAddsCount) {
// Lazy Background Page doesn't exist yet.
extensions::ProcessManager* pm =
- extensions::ExtensionSystem::Get(browser()->profile())->process_manager();
+ extensions::ProcessManager::Get(browser()->profile());
EXPECT_FALSE(pm->GetBackgroundHostForExtension(last_loaded_extension_id()));
EXPECT_EQ(1, browser()->tab_strip_model()->count());
« no previous file with comments | « chrome/browser/extensions/gpu_browsertest.cc ('k') | chrome/browser/extensions/notifications_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698