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

Unified Diff: extensions/renderer/extension_helper.cc

Issue 890083002: [Extensions] Propagate activeTab hosts to extension background pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « extensions/renderer/extension_helper.h ('k') | extensions/renderer/tab_finder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/extension_helper.cc
diff --git a/extensions/renderer/extension_helper.cc b/extensions/renderer/extension_helper.cc
index 100d3429b3e2345a14854fd0fd0a7fbde83fdcfd..f664ae9348b5fa73324462c3828fc91f7a25e260 100644
--- a/extensions/renderer/extension_helper.cc
+++ b/extensions/renderer/extension_helper.cc
@@ -145,10 +145,6 @@ bool ExtensionHelper::OnMessageReceived(const IPC::Message& message) {
OnAddMessageToConsole)
IPC_MESSAGE_HANDLER(ExtensionMsg_AppWindowClosed,
OnAppWindowClosed)
- IPC_MESSAGE_HANDLER(ExtensionMsg_UpdateTabSpecificPermissions,
- OnUpdateTabSpecificPermissions)
- IPC_MESSAGE_HANDLER(ExtensionMsg_ClearTabSpecificPermissions,
- OnClearTabSpecificPermissions)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -236,35 +232,4 @@ void ExtensionHelper::OnAppWindowClosed() {
"onAppWindowClosed");
}
-void ExtensionHelper::OnUpdateTabSpecificPermissions(
- const GURL& url,
- const std::string& extension_id,
- const extensions::URLPatternSet& origin_set) {
- // Check against the URL to avoid races.
- GURL active_url(render_view()->GetWebView()->mainFrame()->document().url());
- if (active_url != url)
- return;
-
- const Extension* extension = dispatcher_->extensions()->GetByID(extension_id);
- if (!extension)
- return;
-
- extension->permissions_data()->UpdateTabSpecificPermissions(
- tab_id_,
- new extensions::PermissionSet(extensions::APIPermissionSet(),
- extensions::ManifestPermissionSet(),
- origin_set,
- extensions::URLPatternSet()));
-}
-
-void ExtensionHelper::OnClearTabSpecificPermissions(
- const std::vector<std::string>& extension_ids) {
- for (const auto& id : extension_ids) {
- const extensions::Extension* extension =
- dispatcher_->extensions()->GetByID(id);
- if (extension)
- extension->permissions_data()->ClearTabSpecificPermissions(tab_id_);
- }
-}
-
} // namespace extensions
« no previous file with comments | « extensions/renderer/extension_helper.h ('k') | extensions/renderer/tab_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698