| 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 <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 11 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
| 12 #include "base/macros.h" | 13 #include "base/macros.h" |
| 13 #include "base/memory/ref_counted_delete_on_sequence.h" | 14 #include "base/memory/ref_counted_delete_on_sequence.h" |
| 14 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 15 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 16 #include "content/public/browser/utility_process_mojo_client.h" | 17 #include "content/public/browser/utility_process_mojo_client.h" |
| 17 #include "extensions/browser/crx_file_info.h" | 18 #include "extensions/browser/crx_file_info.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 INVALID_PATH_FOR_CATALOG, | 168 INVALID_PATH_FOR_CATALOG, |
| 168 ERROR_SERIALIZING_CATALOG, | 169 ERROR_SERIALIZING_CATALOG, |
| 169 ERROR_SAVING_CATALOG, | 170 ERROR_SAVING_CATALOG, |
| 170 | 171 |
| 171 // SandboxedUnpacker::ValidateSignature() | 172 // SandboxedUnpacker::ValidateSignature() |
| 172 CRX_HASH_VERIFICATION_FAILED, | 173 CRX_HASH_VERIFICATION_FAILED, |
| 173 | 174 |
| 174 UNZIP_FAILED, | 175 UNZIP_FAILED, |
| 175 DIRECTORY_MOVE_FAILED, | 176 DIRECTORY_MOVE_FAILED, |
| 176 | 177 |
| 178 // SandboxedUnpacker::ValidateSignature() |
| 179 CRX_FILE_IS_DELTA_UPDATE, |
| 180 CRX_EXPECTED_HASH_INVALID, |
| 181 |
| 177 NUM_FAILURE_REASONS | 182 NUM_FAILURE_REASONS |
| 178 }; | 183 }; |
| 179 | 184 |
| 180 friend class SandboxedUnpackerTest; | 185 friend class SandboxedUnpackerTest; |
| 181 | 186 |
| 182 ~SandboxedUnpacker(); | 187 ~SandboxedUnpacker(); |
| 183 | 188 |
| 184 // Create |temp_dir_| used to unzip or unpack the extension in. | 189 // Create |temp_dir_| used to unzip or unpack the extension in. |
| 185 bool CreateTempDirectory(); | 190 bool CreateTempDirectory(); |
| 186 | 191 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 // Utility client used for sending tasks to the utility process. | 277 // Utility client used for sending tasks to the utility process. |
| 273 std::unique_ptr<content::UtilityProcessMojoClient<mojom::ExtensionUnpacker>> | 278 std::unique_ptr<content::UtilityProcessMojoClient<mojom::ExtensionUnpacker>> |
| 274 utility_process_mojo_client_; | 279 utility_process_mojo_client_; |
| 275 | 280 |
| 276 DISALLOW_COPY_AND_ASSIGN(SandboxedUnpacker); | 281 DISALLOW_COPY_AND_ASSIGN(SandboxedUnpacker); |
| 277 }; | 282 }; |
| 278 | 283 |
| 279 } // namespace extensions | 284 } // namespace extensions |
| 280 | 285 |
| 281 #endif // EXTENSIONS_BROWSER_SANDBOXED_UNPACKER_H_ | 286 #endif // EXTENSIONS_BROWSER_SANDBOXED_UNPACKER_H_ |
| OLD | NEW |