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 4be6d372d68490c9fe7e1bf90a8eca2397f371c9..d750560511d43ad1f78b949735322b17701b27c3 100644 |
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc |
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc |
@@ -37,8 +37,10 @@ |
#include "net/base/net_util.h" |
#include "ui/base/l10n/l10n_util.h" |
#include "ui/base/resource/resource_bundle.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
using content::BrowserThread; |
+using WebKit::WebSecurityOrigin; |
// GeolocationInfoBarQueueController ------------------------------------------ |
@@ -551,14 +553,16 @@ void ChromeGeolocationPermissionContext::RequestGeolocationPermission( |
} |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
- ExtensionService* extensions = profile_->GetExtensionService(); |
- if (extensions) { |
- const Extension* ext = extensions->GetExtensionByURL(requesting_frame); |
- if (!ext) |
- ext = extensions->GetExtensionByWebExtent(requesting_frame); |
+ ExtensionService* ext_service = profile_->GetExtensionService(); |
Aaron Boodman
2011/12/09 16:05:20
Styleguide says to avoid abbreviations.
Yoyo Zhou
2011/12/09 19:59:09
Ok. I'll fix that - here and some other places I f
|
+ if (ext_service) { |
+ const Extension* ext = |
+ ext_service->extensions()->GetByURL(ExtensionURLInfo( |
+ WebSecurityOrigin::createFromString( |
Aaron Boodman
2011/12/09 16:05:20
Nuts. This should be an easy one to cleanup though
Yoyo Zhou
2011/12/09 19:59:09
What do you mean - using a string16/WebSecurityOri
|
+ UTF8ToUTF16(requesting_frame.spec())), |
+ requesting_frame)); |
if (ext && ext->HasAPIPermission(ExtensionAPIPermission::kGeolocation)) { |
// Make sure the extension is in the calling process. |
- if (extensions->process_map()->Contains(ext->id(), render_process_id)) { |
+ if (ext_service->process_map()->Contains(ext->id(), render_process_id)) { |
NotifyPermissionSet(render_process_id, render_view_id, bridge_id, |
requesting_frame, callback, true); |
return; |