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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 // Utility process crashed or failed while trying to install. | 199 // Utility process crashed or failed while trying to install. |
200 void UtilityProcessCrashed(); | 200 void UtilityProcessCrashed(); |
201 | 201 |
202 // Unzips the extension into directory. | 202 // Unzips the extension into directory. |
203 void Unzip(const base::FilePath& crx_path); | 203 void Unzip(const base::FilePath& crx_path); |
204 void UnzipDone(const base::FilePath& directory, bool success); | 204 void UnzipDone(const base::FilePath& directory, bool success); |
205 | 205 |
206 // Unpacks the extension in directory and returns the manifest. | 206 // Unpacks the extension in directory and returns the manifest. |
207 void Unpack(const base::FilePath& directory); | 207 void Unpack(const base::FilePath& directory); |
208 void UnpackDone(const base::string16& error, | 208 void UnpackDone(const base::string16& error, |
209 std::unique_ptr<base::DictionaryValue> manifest); | 209 const base::Optional<base::DictionaryValue>& manifest); |
210 void UnpackExtensionSucceeded( | 210 void UnpackExtensionSucceeded( |
211 std::unique_ptr<base::DictionaryValue> manifest); | 211 std::unique_ptr<base::DictionaryValue> manifest); |
212 void UnpackExtensionFailed(const base::string16& error); | 212 void UnpackExtensionFailed(const base::string16& error); |
213 | 213 |
214 // Reports unpack success or failure, or unzip failure. | 214 // Reports unpack success or failure, or unzip failure. |
215 void ReportSuccess(std::unique_ptr<base::DictionaryValue> original_manifest, | 215 void ReportSuccess(std::unique_ptr<base::DictionaryValue> original_manifest, |
216 const SkBitmap& install_icon); | 216 const SkBitmap& install_icon); |
217 void ReportFailure(FailureReason reason, const base::string16& error); | 217 void ReportFailure(FailureReason reason, const base::string16& error); |
218 | 218 |
219 // Overwrites original manifest with safe result from utility process. | 219 // Overwrites original manifest with safe result from utility process. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 // Utility client used for sending tasks to the utility process. | 272 // Utility client used for sending tasks to the utility process. |
273 std::unique_ptr<content::UtilityProcessMojoClient<mojom::ExtensionUnpacker>> | 273 std::unique_ptr<content::UtilityProcessMojoClient<mojom::ExtensionUnpacker>> |
274 utility_process_mojo_client_; | 274 utility_process_mojo_client_; |
275 | 275 |
276 DISALLOW_COPY_AND_ASSIGN(SandboxedUnpacker); | 276 DISALLOW_COPY_AND_ASSIGN(SandboxedUnpacker); |
277 }; | 277 }; |
278 | 278 |
279 } // namespace extensions | 279 } // namespace extensions |
280 | 280 |
281 #endif // EXTENSIONS_BROWSER_SANDBOXED_UNPACKER_H_ | 281 #endif // EXTENSIONS_BROWSER_SANDBOXED_UNPACKER_H_ |
OLD | NEW |