Remove PermissionsData::ForExtension() completely

There's no reason to have this. It was originally because PermissionsData
didn't really belong on Extension (and was to be taken off), but now that
PermissionsData is refactored to only include active permissions, it belongs
on the extension object.

[email protected] (c/b/ui - simple refactor, no functional changes)
[email protected] (c/b/media_galleries - simple refactor, no functional changes)
BUG=379356

Review URL: https://codereview.chromium.org/315573003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275332 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index b0177e1..fc1d3c57 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -389,10 +389,9 @@
     WebContents* contents,
     const Extension* extension,
     base::DictionaryValue* tab_info) {
-  bool has_permission =
-      extension &&
-      PermissionsData::ForExtension(extension)
-          ->HasAPIPermissionForTab(GetTabId(contents), APIPermission::kTab);
+  bool has_permission = extension &&
+                        extension->permissions_data()->HasAPIPermissionForTab(
+                            GetTabId(contents), APIPermission::kTab);
 
   if (!has_permission) {
     tab_info->Remove(keys::kUrlKey, NULL);