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

Unified Diff: chrome/browser/extensions/api/extension_action/browser_action_apitest.cc

Issue 11365181: Remove GetExtensionService from Profile. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: replace missing extension_system include Created 8 years, 1 month 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: chrome/browser/extensions/api/extension_action/browser_action_apitest.cc
diff --git a/chrome/browser/extensions/api/extension_action/browser_action_apitest.cc b/chrome/browser/extensions/api/extension_action/browser_action_apitest.cc
index dba811ac781c934b0a2971ffc5d002f306c53bf3..81c1d5477671536251ededa8ff0bdc09bbbd65a8 100644
--- a/chrome/browser/extensions/api/extension_action/browser_action_apitest.cc
+++ b/chrome/browser/extensions/api/extension_action/browser_action_apitest.cc
@@ -122,7 +122,8 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, Basic) {
ui_test_utils::NavigateToURL(browser(),
test_server()->GetURL("files/extensions/test_file.txt"));
- ExtensionService* service = browser()->profile()->GetExtensionService();
+ ExtensionService* service = extensions::ExtensionSystem::Get(
+ browser()->profile())->extension_service();
service->toolbar_model()->ExecuteBrowserAction(extension, browser(), NULL);
ASSERT_TRUE(catcher.GetNextResult()) << catcher.message();
@@ -486,8 +487,8 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, IncognitoBasic) {
// Now enable the extension in incognito mode, and test that the browser
// action shows up. Note that we don't update the existing window at the
// moment, so we just create a new one.
- browser()->profile()->GetExtensionService()->extension_prefs()->
- SetIsIncognitoEnabled(extension->id(), true);
+ extensions::ExtensionSystem::Get(browser()->profile())->extension_service()->
+ extension_prefs()->SetIsIncognitoEnabled(extension->id(), true);
chrome::CloseWindow(incognito_browser);
incognito_browser = new Browser(Browser::CreateParams(incognito_profile));
@@ -499,7 +500,8 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, IncognitoBasic) {
}
IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, IncognitoDragging) {
- ExtensionService* service = browser()->profile()->GetExtensionService();
+ ExtensionService* service = extensions::ExtensionSystem::Get(
+ browser()->profile())->extension_service();
// The tooltips for each respective browser action.
const char kTooltipA[] = "Make this page red";
@@ -588,8 +590,8 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, DISABLED_CloseBackgroundPage) {
content::NotificationService::AllSources());
// Click the browser action.
- browser()->profile()->GetExtensionService()->toolbar_model()->
- ExecuteBrowserAction(extension, browser(), NULL);
+ extensions::ExtensionSystem::Get(browser()->profile())->extension_service()->
+ toolbar_model()->ExecuteBrowserAction(extension, browser(), NULL);
// It can take a moment for the background page to actually get destroyed
// so we wait for the notification before checking that it's really gone

Powered by Google App Engine
This is Rietveld 408576698