Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index c3604db859ec62e41be7a923bfb7a22ea547f933..8a5c852cd9a65389d21366ea947bd612cca5e6b3 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -542,8 +542,13 @@ TabContents* Browser::OpenApplicationWindow( |
url = extension->GetFullLaunchURL(); |
} |
- // TODO(erikkay) this can't be correct for extensions |
- std::string app_name = web_app::GenerateApplicationNameFromURL(url); |
+ std::string app_name; |
+ if (extension) |
+ app_name = |
+ web_app::GenerateApplicationNameFromExtensionId(extension->id()); |
+ else |
+ app_name = web_app::GenerateApplicationNameFromURL(url); |
+ |
RegisterAppPrefs(app_name); |
bool as_panel = extension && (container == extension_misc::LAUNCH_PANEL); |