Index: chrome/browser/extensions/extension_service.cc |
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc |
index 702fc8683b33d113257efb56d231d19947bcbb65..a0d334e39a6a409359f282e618846397d2c61f07 100644 |
--- a/chrome/browser/extensions/extension_service.cc |
+++ b/chrome/browser/extensions/extension_service.cc |
@@ -326,14 +326,22 @@ bool ExtensionService::IsDownloadFromMiniGallery(const GURL& download_url) { |
false); // case_sensitive |
} |
-bool ExtensionService::IsInstalledApp(const GURL& url) { |
+const Extension* ExtensionService::GetInstalledApp(const GURL& url) { |
// Check for hosted app. |
- if (GetExtensionByWebExtent(url) != NULL) |
- return true; |
+ const Extension* app = GetExtensionByWebExtent(url); |
+ if (app) |
+ return app; |
// Check for packaged app. |
- const Extension* extension = GetExtensionByURL(url); |
- return extension != NULL && extension->is_app(); |
+ app = GetExtensionByURL(url); |
+ if (app && app->is_app()) |
+ return app; |
+ |
+ return NULL; |
+} |
+ |
+bool ExtensionService::IsInstalledApp(const GURL& url) { |
+ return !!GetInstalledApp(url); |
} |
// static |