OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_EXTENSION_UNPACKER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_SANDBOXED_EXTENSION_UNPACKER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_SANDBOXED_EXTENSION_UNPACKER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_SANDBOXED_EXTENSION_UNPACKER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // just for unpacking is there and code just for sandboxing of unpacking is | 117 // just for unpacking is there and code just for sandboxing of unpacking is |
118 // here. | 118 // here. |
119 bool ValidateSignature(); | 119 bool ValidateSignature(); |
120 | 120 |
121 // Starts the utility process that unpacks our extension. | 121 // Starts the utility process that unpacks our extension. |
122 void StartProcessOnIOThread(const FilePath& temp_crx_path); | 122 void StartProcessOnIOThread(const FilePath& temp_crx_path); |
123 | 123 |
124 // SandboxedExtensionUnpacker | 124 // SandboxedExtensionUnpacker |
125 virtual void OnUnpackExtensionSucceeded(const DictionaryValue& manifest); | 125 virtual void OnUnpackExtensionSucceeded(const DictionaryValue& manifest); |
126 virtual void OnUnpackExtensionFailed(const std::string& error_message); | 126 virtual void OnUnpackExtensionFailed(const std::string& error_message); |
127 virtual void OnProcessCrashed(); | 127 virtual void OnProcessCrashed(int exit_code); |
128 | 128 |
129 void ReportFailure(const std::string& message); | 129 void ReportFailure(const std::string& message); |
130 void ReportSuccess(); | 130 void ReportSuccess(); |
131 | 131 |
132 // Overwrites original manifest with safe result from utility process. | 132 // Overwrites original manifest with safe result from utility process. |
133 // Returns NULL on error. Caller owns the returned object. | 133 // Returns NULL on error. Caller owns the returned object. |
134 DictionaryValue* RewriteManifestFile(const DictionaryValue& manifest); | 134 DictionaryValue* RewriteManifestFile(const DictionaryValue& manifest); |
135 | 135 |
136 // Overwrites original files with safe results from utility process. | 136 // Overwrites original files with safe results from utility process. |
137 // Reports error and returns false if it fails. | 137 // Reports error and returns false if it fails. |
(...skipping 25 matching lines...) Expand all Loading... |
163 scoped_refptr<Extension> extension_; | 163 scoped_refptr<Extension> extension_; |
164 | 164 |
165 // Whether we've received a response from the utility process yet. | 165 // Whether we've received a response from the utility process yet. |
166 bool got_response_; | 166 bool got_response_; |
167 | 167 |
168 // The public key that was extracted from the CRX header. | 168 // The public key that was extracted from the CRX header. |
169 std::string public_key_; | 169 std::string public_key_; |
170 }; | 170 }; |
171 | 171 |
172 #endif // CHROME_BROWSER_EXTENSIONS_SANDBOXED_EXTENSION_UNPACKER_H_ | 172 #endif // CHROME_BROWSER_EXTENSIONS_SANDBOXED_EXTENSION_UNPACKER_H_ |
OLD | NEW |