diff options
Diffstat (limited to 'chrome/browser/extensions/extension_function_dispatcher.cc')
-rw-r--r-- | chrome/browser/extensions/extension_function_dispatcher.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc index e3ca590..beb96e8 100644 --- a/chrome/browser/extensions/extension_function_dispatcher.cc +++ b/chrome/browser/extensions/extension_function_dispatcher.cc @@ -274,6 +274,7 @@ void FactoryRegistry::ResetFunctions() { // Management. RegisterFunction<GetAllExtensionsFunction>(); + RegisterFunction<GetExtensionByIdFunction>(); RegisterFunction<LaunchAppFunction>(); RegisterFunction<SetEnabledFunction>(); RegisterFunction<UninstallFunction>(); @@ -341,7 +342,7 @@ ExtensionFunctionDispatcher* ExtensionFunctionDispatcher::Create( if (!service->ExtensionBindingsAllowed(url)) return NULL; - Extension* extension = service->GetExtensionByURL(url); + const Extension* extension = service->GetExtensionByURL(url); if (!extension) extension = service->GetExtensionByWebExtent(url); @@ -355,7 +356,7 @@ ExtensionFunctionDispatcher* ExtensionFunctionDispatcher::Create( ExtensionFunctionDispatcher::ExtensionFunctionDispatcher( RenderViewHost* render_view_host, Delegate* delegate, - Extension* extension, + const Extension* extension, const GURL& url) : profile_(render_view_host->process()->profile()), render_view_host_(render_view_host), @@ -448,10 +449,9 @@ void ExtensionFunctionDispatcher::HandleRequest( function->set_user_gesture(params.user_gesture); ExtensionsService* service = profile()->GetExtensionsService(); DCHECK(service); - Extension* extension = service->GetExtensionById(extension_id(), false); + const Extension* extension = service->GetExtensionById(extension_id(), false); DCHECK(extension); - function->set_include_incognito(service->IsIncognitoEnabled(extension) && - !extension->incognito_split_mode()); + function->set_include_incognito(service->CanCrossIncognito(extension)); if (!service->ExtensionBindingsAllowed(function->source_url()) || !extension->HasApiPermission(function->name())) { |