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

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

Issue 10917026: Switch Extensions::TabHelper to use WebContents, WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 8 years, 3 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/menu_manager.cc ('k') | chrome/browser/extensions/script_badge_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/page_action_controller.cc
diff --git a/chrome/browser/extensions/page_action_controller.cc b/chrome/browser/extensions/page_action_controller.cc
index 48996b1bc5e1daf03ad28f1b375e8bdb06f4fad9..67235783bdb3bd8d8d6a1802e8a9d5ba9e7e5978 100644
--- a/chrome/browser/extensions/page_action_controller.cc
+++ b/chrome/browser/extensions/page_action_controller.cc
@@ -54,9 +54,8 @@ LocationBarController::Action PageActionController::OnClicked(
CHECK(page_action);
int tab_id = ExtensionTabUtil::GetTabId(web_contents());
- TabContents* tab_contents = TabContents::FromWebContents(web_contents());
- tab_contents->extension_tab_helper()->active_tab_permission_manager()->
- GrantIfRequested(extension);
+ extensions::TabHelper::FromWebContents(web_contents())->
+ active_tab_permission_manager()->GrantIfRequested(extension);
switch (mouse_button) {
case 1: // left
@@ -65,7 +64,7 @@ LocationBarController::Action PageActionController::OnClicked(
return ACTION_SHOW_POPUP;
GetExtensionService()->browser_event_router()->PageActionExecuted(
- tab_contents->profile(),
+ Profile::FromBrowserContext(web_contents()->GetBrowserContext()),
*page_action,
tab_id,
web_contents()->GetURL().spec(),
« no previous file with comments | « chrome/browser/extensions/menu_manager.cc ('k') | chrome/browser/extensions/script_badge_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698