| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 180 |
| 181 CrxInstaller(base::WeakPtr<ExtensionService> frontend_weak, | 181 CrxInstaller(base::WeakPtr<ExtensionService> frontend_weak, |
| 182 ExtensionInstallPrompt* client, | 182 ExtensionInstallPrompt* client, |
| 183 const WebstoreInstaller::Approval* approval); | 183 const WebstoreInstaller::Approval* approval); |
| 184 virtual ~CrxInstaller(); | 184 virtual ~CrxInstaller(); |
| 185 | 185 |
| 186 // Converts the source user script to an extension. | 186 // Converts the source user script to an extension. |
| 187 void ConvertUserScriptOnFileThread(); | 187 void ConvertUserScriptOnFileThread(); |
| 188 | 188 |
| 189 // Converts the source web app to an extension. | 189 // Converts the source web app to an extension. |
| 190 void ConvertWebAppOnFileThread(const WebApplicationInfo& web_app); | 190 void ConvertWebAppOnFileThread(const WebApplicationInfo& web_app, |
| 191 const FilePath& install_directory); |
| 191 | 192 |
| 192 // Called after OnUnpackSuccess as a last check to see whether the install | 193 // Called after OnUnpackSuccess as a last check to see whether the install |
| 193 // should complete. | 194 // should complete. |
| 194 CrxInstallerError AllowInstall(const Extension* extension); | 195 CrxInstallerError AllowInstall(const Extension* extension); |
| 195 | 196 |
| 196 // SandboxedUnpackerClient | 197 // SandboxedUnpackerClient |
| 197 virtual void OnUnpackFailure(const string16& error_message) OVERRIDE; | 198 virtual void OnUnpackFailure(const string16& error_message) OVERRIDE; |
| 198 virtual void OnUnpackSuccess(const FilePath& temp_dir, | 199 virtual void OnUnpackSuccess(const FilePath& temp_dir, |
| 199 const FilePath& extension_dir, | 200 const FilePath& extension_dir, |
| 200 const base::DictionaryValue* original_manifest, | 201 const base::DictionaryValue* original_manifest, |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 | 362 |
| 362 // Used to show the install dialog. | 363 // Used to show the install dialog. |
| 363 ExtensionInstallPrompt::ShowDialogCallback show_dialog_callback_; | 364 ExtensionInstallPrompt::ShowDialogCallback show_dialog_callback_; |
| 364 | 365 |
| 365 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); | 366 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); |
| 366 }; | 367 }; |
| 367 | 368 |
| 368 } // namespace extensions | 369 } // namespace extensions |
| 369 | 370 |
| 370 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ | 371 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
| OLD | NEW |