Index: chrome/browser/extensions/crx_installer.cc |
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc |
index 32ec7873c2e1462066f2590f90a8757d0f3b3888..eb107284f64f01c69b631dfcd566377435f061e1 100644 |
--- a/chrome/browser/extensions/crx_installer.cc |
+++ b/chrome/browser/extensions/crx_installer.cc |
@@ -230,21 +230,18 @@ void CrxInstaller::ConvertUserScriptOnFileThread() { |
void CrxInstaller::InstallWebApp(const WebApplicationInfo& web_app) { |
NotifyCrxInstallBegin(); |
+ // Web apps can only ever be converted to bookmark apps. |
+ DCHECK(creation_flags_ & Extension::FROM_BOOKMARK); |
if (!installer_task_runner_->PostTask( |
FROM_HERE, |
- base::Bind(&CrxInstaller::ConvertWebAppOnFileThread, |
- this, |
- web_app, |
- install_directory_))) |
+ base::Bind(&CrxInstaller::ConvertWebAppOnFileThread, this, web_app))) |
NOTREACHED(); |
} |
void CrxInstaller::ConvertWebAppOnFileThread( |
- const WebApplicationInfo& web_app, |
- const base::FilePath& install_directory) { |
- base::string16 error; |
- scoped_refptr<Extension> extension( |
- ConvertWebAppToExtension(web_app, base::Time::Now(), install_directory)); |
+ const WebApplicationInfo& web_app) { |
+ scoped_refptr<Extension> extension(ConvertWebAppToExtension( |
+ web_app, base::Time::Now(), creation_flags_, install_directory_)); |
if (!extension.get()) { |
// Validation should have stopped any potential errors before getting here. |
NOTREACHED() << "Could not convert web app to extension."; |