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

Side by Side Diff: chrome/browser/geolocation/geolocation_permission_context_extensions.cc

Issue 1200503002: [Extensions] Kill off ExtensionMsg_AddMessageToConsole (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/geolocation/geolocation_permission_context_extensions.h " 5 #include "chrome/browser/geolocation/geolocation_permission_context_extensions.h "
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 8
9 #if defined(ENABLE_EXTENSIONS) 9 #if defined(ENABLE_EXTENSIONS)
10 #include "chrome/browser/permissions/permission_request_id.h" 10 #include "chrome/browser/permissions/permission_request_id.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 return true; 64 return true;
65 } 65 }
66 66
67 ExtensionRegistry* extension_registry = ExtensionRegistry::Get(profile_); 67 ExtensionRegistry* extension_registry = ExtensionRegistry::Get(profile_);
68 if (extension_registry) { 68 if (extension_registry) {
69 const extensions::Extension* extension = 69 const extensions::Extension* extension =
70 extension_registry->enabled_extensions().GetExtensionOrAppByURL( 70 extension_registry->enabled_extensions().GetExtensionOrAppByURL(
71 requesting_frame_origin); 71 requesting_frame_origin);
72 if (IsExtensionWithPermissionOrSuggestInConsole( 72 if (IsExtensionWithPermissionOrSuggestInConsole(
73 APIPermission::kGeolocation, extension, 73 APIPermission::kGeolocation, extension,
74 web_contents->GetRenderViewHost())) { 74 web_contents->GetMainFrame())) {
75 // Make sure the extension is in the calling process. 75 // Make sure the extension is in the calling process.
76 if (extensions::ProcessMap::Get(profile_)->Contains( 76 if (extensions::ProcessMap::Get(profile_)->Contains(
77 extension->id(), request_id.render_process_id())) { 77 extension->id(), request_id.render_process_id())) {
78 *permission_set = true; 78 *permission_set = true;
79 *new_permission = true; 79 *new_permission = true;
80 return true; 80 return true;
81 } 81 }
82 } 82 }
83 } 83 }
84 84
(...skipping 22 matching lines...) Expand all
107 web_contents ? 107 web_contents ?
108 extensions::WebViewPermissionHelper::FromWebContents(web_contents) 108 extensions::WebViewPermissionHelper::FromWebContents(web_contents)
109 : NULL; 109 : NULL;
110 if (web_view_permission_helper) { 110 if (web_view_permission_helper) {
111 web_view_permission_helper->CancelGeolocationPermissionRequest(bridge_id); 111 web_view_permission_helper->CancelGeolocationPermissionRequest(bridge_id);
112 return true; 112 return true;
113 } 113 }
114 #endif // defined(ENABLE_EXTENSIONS) 114 #endif // defined(ENABLE_EXTENSIONS)
115 return false; 115 return false;
116 } 116 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/mdns/mdns_api.cc ('k') | chrome/browser/notifications/desktop_notification_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698