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

Unified Diff: chrome/browser/geolocation/chrome_geolocation_permission_context.cc

Issue 139943005: Convert extensions::ProcessMap to BrowserContextKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase process_map Created 6 years, 11 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/process_management_browsertest.cc ('k') | chrome/browser/memory_details.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/geolocation/chrome_geolocation_permission_context.cc
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
index 616c1b14f310855465f79a52cc718e34dc20eaef..01e69ee839d8b4f69ad92b41f9a99e5b9ff9ece3 100644
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
@@ -13,18 +13,19 @@
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/content_settings/permission_request_id.h"
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
-#include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/extensions/suggest_permission_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tab_contents/tab_util.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/browser/extension_registry.h"
+#include "extensions/browser/process_map.h"
#include "extensions/browser/view_type_utils.h"
#include "extensions/common/extension.h"
using extensions::APIPermission;
+using extensions::ExtensionRegistry;
ChromeGeolocationPermissionContext::ChromeGeolocationPermissionContext(
Profile* profile)
@@ -63,18 +64,17 @@ void ChromeGeolocationPermissionContext::RequestGeolocationPermission(
content::WebContents* web_contents =
tab_util::GetWebContentsByID(render_process_id, render_view_id);
const PermissionRequestID id(render_process_id, render_view_id, bridge_id, 0);
- ExtensionService* extension_service =
- extensions::ExtensionSystem::Get(profile_)->extension_service();
- if (extension_service) {
+ ExtensionRegistry* extension_registry = ExtensionRegistry::Get(profile_);
+ if (extension_registry) {
const extensions::Extension* extension =
- extension_service->extensions()->GetExtensionOrAppByURL(
+ extension_registry->enabled_extensions().GetExtensionOrAppByURL(
requesting_frame_origin);
if (IsExtensionWithPermissionOrSuggestInConsole(APIPermission::kGeolocation,
extension,
profile_)) {
// Make sure the extension is in the calling process.
- if (extension_service->process_map()->Contains(extension->id(),
- id.render_process_id())) {
+ if (extensions::ProcessMap::Get(profile_)
+ ->Contains(extension->id(), id.render_process_id())) {
NotifyPermissionSet(id, requesting_frame_origin, callback, true);
return;
}
« no previous file with comments | « chrome/browser/extensions/process_management_browsertest.cc ('k') | chrome/browser/memory_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698