| 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_SANDBOXED_UNPACKER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_SANDBOXED_UNPACKER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_SANDBOXED_UNPACKER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_SANDBOXED_UNPACKER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // extension_root - The path to the extension root inside of temp_dir. | 29 // extension_root - The path to the extension root inside of temp_dir. |
| 30 // | 30 // |
| 31 // original_manifest - The parsed but unmodified version of the manifest, | 31 // original_manifest - The parsed but unmodified version of the manifest, |
| 32 // with no modifications such as localization, etc. | 32 // with no modifications such as localization, etc. |
| 33 // | 33 // |
| 34 // extension - The extension that was unpacked. The client is responsible | 34 // extension - The extension that was unpacked. The client is responsible |
| 35 // for deleting this memory. | 35 // for deleting this memory. |
| 36 virtual void OnUnpackSuccess(const FilePath& temp_dir, | 36 virtual void OnUnpackSuccess(const FilePath& temp_dir, |
| 37 const FilePath& extension_root, | 37 const FilePath& extension_root, |
| 38 const base::DictionaryValue* original_manifest, | 38 const base::DictionaryValue* original_manifest, |
| 39 const Extension* extension) = 0; | 39 Extension* extension) = 0; |
| 40 virtual void OnUnpackFailure(const string16& error) = 0; | 40 virtual void OnUnpackFailure(const string16& error) = 0; |
| 41 | 41 |
| 42 protected: | 42 protected: |
| 43 friend class base::RefCountedThreadSafe<SandboxedUnpackerClient>; | 43 friend class base::RefCountedThreadSafe<SandboxedUnpackerClient>; |
| 44 | 44 |
| 45 virtual ~SandboxedUnpackerClient() {} | 45 virtual ~SandboxedUnpackerClient() {} |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 // SandboxedUnpacker unpacks extensions from the CRX format into a | 48 // SandboxedUnpacker unpacks extensions from the CRX format into a |
| 49 // directory. This is done in a sandboxed subprocess to protect the browser | 49 // directory. This is done in a sandboxed subprocess to protect the browser |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 Extension::Location location_; | 224 Extension::Location location_; |
| 225 | 225 |
| 226 // Creation flags to use for the extension. These flags will be used | 226 // Creation flags to use for the extension. These flags will be used |
| 227 // when calling Extenion::Create() by the crx installer. | 227 // when calling Extenion::Create() by the crx installer. |
| 228 int creation_flags_; | 228 int creation_flags_; |
| 229 }; | 229 }; |
| 230 | 230 |
| 231 } // namespace extensions | 231 } // namespace extensions |
| 232 | 232 |
| 233 #endif // CHROME_BROWSER_EXTENSIONS_SANDBOXED_UNPACKER_H_ | 233 #endif // CHROME_BROWSER_EXTENSIONS_SANDBOXED_UNPACKER_H_ |
| OLD | NEW |