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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 660293002: Refactor extension code for notification permission handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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 | « no previous file | chrome/browser/notifications/desktop_notification_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 6900ebe87361a5ba56eeab3396402e97a5f94d41..f57d75c04f098c77d5fe3bdf545caba967341b31 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -229,7 +229,6 @@
#include "extensions/browser/guest_view/web_view/web_view_guest.h"
#include "extensions/browser/guest_view/web_view/web_view_permission_helper.h"
#include "extensions/browser/guest_view/web_view/web_view_renderer_state.h"
-#include "extensions/browser/suggest_permission_util.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
@@ -1829,35 +1828,6 @@ void ChromeContentBrowserClient::RequestDesktopNotificationPermission(
render_frame_host->GetSiteInstance()->GetBrowserContext());
DesktopNotificationService* notification_service =
DesktopNotificationServiceFactory::GetForProfile(profile);
-#if defined(ENABLE_EXTENSIONS)
- InfoMap* extension_info_map =
- extensions::ExtensionSystem::Get(profile)->info_map();
- const Extension* extension = NULL;
- if (extension_info_map) {
- extensions::ExtensionSet extensions;
- extension_info_map->GetExtensionsWithAPIPermissionForSecurityOrigin(
- source_origin,
- render_frame_host->GetProcess()->GetID(),
- extensions::APIPermission::kNotifications,
- &extensions);
- for (extensions::ExtensionSet::const_iterator iter = extensions.begin();
- iter != extensions.end(); ++iter) {
- if (notification_service->IsNotifierEnabled(NotifierId(
- NotifierId::APPLICATION, (*iter)->id()))) {
- extension = iter->get();
- break;
- }
- }
- }
- if (IsExtensionWithPermissionOrSuggestInConsole(
- APIPermission::kNotifications,
- extension,
- render_frame_host->GetRenderViewHost())) {
- callback.Run(blink::WebNotificationPermissionAllowed);
- return;
- }
-#endif
-
WebContents* web_contents = WebContents::FromRenderFrameHost(
render_frame_host);
int render_process_id = render_frame_host->GetProcess()->GetID();
« no previous file with comments | « no previous file | chrome/browser/notifications/desktop_notification_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698