| 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 EXTENSIONS_BROWSER_SANDBOXED_UNPACKER_H_ | 5 #ifndef EXTENSIONS_BROWSER_SANDBOXED_UNPACKER_H_ |
| 6 #define EXTENSIONS_BROWSER_SANDBOXED_UNPACKER_H_ | 6 #define EXTENSIONS_BROWSER_SANDBOXED_UNPACKER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // | 44 // |
| 45 // extension_root - The path to the extension root inside of temp_dir. | 45 // extension_root - The path to the extension root inside of temp_dir. |
| 46 // | 46 // |
| 47 // original_manifest - The parsed but unmodified version of the manifest, | 47 // original_manifest - The parsed but unmodified version of the manifest, |
| 48 // with no modifications such as localization, etc. | 48 // with no modifications such as localization, etc. |
| 49 // | 49 // |
| 50 // extension - The extension that was unpacked. The client is responsible | 50 // extension - The extension that was unpacked. The client is responsible |
| 51 // for deleting this memory. | 51 // for deleting this memory. |
| 52 // | 52 // |
| 53 // install_icon - The icon we will display in the installation UI, if any. | 53 // install_icon - The icon we will display in the installation UI, if any. |
| 54 virtual void OnUnpackSuccess(const base::FilePath& temp_dir, | 54 virtual void OnUnpackSuccess( |
| 55 const base::FilePath& extension_root, | 55 const base::FilePath& temp_dir, |
| 56 const base::DictionaryValue* original_manifest, | 56 const base::FilePath& extension_root, |
| 57 const Extension* extension, | 57 std::unique_ptr<base::DictionaryValue> original_manifest, |
| 58 const SkBitmap& install_icon) = 0; | 58 const Extension* extension, |
| 59 const SkBitmap& install_icon) = 0; |
| 59 virtual void OnUnpackFailure(const CrxInstallError& error) = 0; | 60 virtual void OnUnpackFailure(const CrxInstallError& error) = 0; |
| 60 | 61 |
| 61 protected: | 62 protected: |
| 62 friend class base::RefCountedDeleteOnSequence<SandboxedUnpackerClient>; | 63 friend class base::RefCountedDeleteOnSequence<SandboxedUnpackerClient>; |
| 63 friend class base::DeleteHelper<SandboxedUnpackerClient>; | 64 friend class base::DeleteHelper<SandboxedUnpackerClient>; |
| 64 | 65 |
| 65 virtual ~SandboxedUnpackerClient() = default; | 66 virtual ~SandboxedUnpackerClient() = default; |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 // SandboxedUnpacker does work to optionally unpack and then validate/sanitize | 69 // SandboxedUnpacker does work to optionally unpack and then validate/sanitize |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 // Utility client used for sending tasks to the utility process. | 272 // Utility client used for sending tasks to the utility process. |
| 272 std::unique_ptr<content::UtilityProcessMojoClient<mojom::ExtensionUnpacker>> | 273 std::unique_ptr<content::UtilityProcessMojoClient<mojom::ExtensionUnpacker>> |
| 273 utility_process_mojo_client_; | 274 utility_process_mojo_client_; |
| 274 | 275 |
| 275 DISALLOW_COPY_AND_ASSIGN(SandboxedUnpacker); | 276 DISALLOW_COPY_AND_ASSIGN(SandboxedUnpacker); |
| 276 }; | 277 }; |
| 277 | 278 |
| 278 } // namespace extensions | 279 } // namespace extensions |
| 279 | 280 |
| 280 #endif // EXTENSIONS_BROWSER_SANDBOXED_UNPACKER_H_ | 281 #endif // EXTENSIONS_BROWSER_SANDBOXED_UNPACKER_H_ |
| OLD | NEW |