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

Unified Diff: chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm

Issue 349073004: Cleanup: Remove deprecated Profile::GetExtensionService(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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
Index: chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
index 4b1d6ce731494d981ff2d2cc6134ac558ff67b9e..e7d9fb8332e021bae0b2ba7fa95958c650a5ad96 100644
--- a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
@@ -9,7 +9,6 @@
#include "base/strings/sys_string_conversions.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/extensions/extension_action.h"
-#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/extensions/location_bar_controller.h"
#include "chrome/browser/extensions/tab_helper.h"
@@ -25,6 +24,7 @@
#include "chrome/browser/ui/webui/extensions/extension_info_ui.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/browser/extension_registry.h"
#include "extensions/common/manifest_handlers/icons_handler.h"
#include "skia/ext/skia_utils_mac.h"
#include "ui/gfx/canvas_skia_paint.h"
@@ -53,8 +53,9 @@ PageActionDecoration::PageActionDecoration(
page_action_(page_action),
current_tab_id_(-1),
preview_enabled_(false) {
- const Extension* extension = browser->profile()->GetExtensionService()->
- GetExtensionById(page_action->extension_id(), false);
+ const Extension* extension = extensions::ExtensionRegistry::Get(
+ browser->profile())->enabled_extensions().GetByID(
+ page_action->extension_id());
DCHECK(extension);
icon_factory_.reset(new ExtensionActionIconFactory(
@@ -196,13 +197,11 @@ NSPoint PageActionDecoration::GetBubblePointInFrame(NSRect frame) {
}
NSMenu* PageActionDecoration::GetMenu() {
- ExtensionService* service = browser_->profile()->GetExtensionService();
- if (!service)
- return nil;
- const Extension* extension = service->GetExtensionById(
- page_action_->extension_id(), false);
+ const Extension* extension = extensions::ExtensionRegistry::Get(
+ browser_->profile())->enabled_extensions().GetByID(
+ page_action_->extension_id());
DCHECK(extension);
- if (!extension || !extension->ShowConfigureContextMenus())
+ if (!extension->ShowConfigureContextMenus())
return nil;
contextMenuController_.reset([[ExtensionActionContextMenuController alloc]

Powered by Google App Engine
This is Rietveld 408576698