| 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_UTILITY_UNPACKER_H_ | 5 #ifndef EXTENSIONS_UTILITY_UNPACKER_H_ |
| 6 #define EXTENSIONS_UTILITY_UNPACKER_H_ | 6 #define EXTENSIONS_UTILITY_UNPACKER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // Runs the processing steps for the extension. On success, this returns true | 46 // Runs the processing steps for the extension. On success, this returns true |
| 47 // and the decoded images will be in a file at | 47 // and the decoded images will be in a file at |
| 48 // |working_dir|/kDecodedImagesFilename and the decoded messages will be in a | 48 // |working_dir|/kDecodedImagesFilename and the decoded messages will be in a |
| 49 // file at |working_dir|/kDecodedMessageCatalogsFilename. | 49 // file at |working_dir|/kDecodedMessageCatalogsFilename. |
| 50 bool Run(); | 50 bool Run(); |
| 51 | 51 |
| 52 const base::string16& error_message() { return error_message_; } | 52 const base::string16& error_message() { return error_message_; } |
| 53 base::DictionaryValue* parsed_manifest() { return parsed_manifest_.get(); } | 53 base::DictionaryValue* parsed_manifest() { return parsed_manifest_.get(); } |
| 54 base::DictionaryValue* parsed_catalogs() { return parsed_catalogs_.get(); } | 54 base::DictionaryValue* parsed_catalogs() { return parsed_catalogs_.get(); } |
| 55 | 55 |
| 56 std::unique_ptr<base::DictionaryValue> TakeParsedManifest() { |
| 57 return std::move(parsed_manifest_); |
| 58 } |
| 59 |
| 56 private: | 60 private: |
| 57 // Write the decoded images to kDecodedImagesFilename. We do this instead | 61 // Write the decoded images to kDecodedImagesFilename. We do this instead |
| 58 // of sending them over IPC, since they are so large. Returns true on | 62 // of sending them over IPC, since they are so large. Returns true on |
| 59 // success. | 63 // success. |
| 60 bool DumpImagesToFile(); | 64 bool DumpImagesToFile(); |
| 61 | 65 |
| 62 // Write the decoded messages to kDecodedMessageCatalogsFilename. We do this | 66 // Write the decoded messages to kDecodedMessageCatalogsFilename. We do this |
| 63 // instead of sending them over IPC, since they are so large. Returns true on | 67 // instead of sending them over IPC, since they are so large. Returns true on |
| 64 // success. | 68 // success. |
| 65 bool DumpMessageCatalogsToFile(); | 69 bool DumpMessageCatalogsToFile(); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 112 |
| 109 // The last error message that was set. Empty if there were no errors. | 113 // The last error message that was set. Empty if there were no errors. |
| 110 base::string16 error_message_; | 114 base::string16 error_message_; |
| 111 | 115 |
| 112 DISALLOW_COPY_AND_ASSIGN(Unpacker); | 116 DISALLOW_COPY_AND_ASSIGN(Unpacker); |
| 113 }; | 117 }; |
| 114 | 118 |
| 115 } // namespace extensions | 119 } // namespace extensions |
| 116 | 120 |
| 117 #endif // EXTENSIONS_UTILITY_UNPACKER_H_ | 121 #endif // EXTENSIONS_UTILITY_UNPACKER_H_ |
| OLD | NEW |