OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 // put here because we cannot run windows crypto code in the sandbox. But we | 187 // put here because we cannot run windows crypto code in the sandbox. But we |
188 // could still have this method statically on ExtensionUnpacker so that code | 188 // could still have this method statically on ExtensionUnpacker so that code |
189 // just for unpacking is there and code just for sandboxing of unpacking is | 189 // just for unpacking is there and code just for sandboxing of unpacking is |
190 // here. | 190 // here. |
191 bool ValidateSignature(); | 191 bool ValidateSignature(); |
192 | 192 |
193 // Starts the utility process that unpacks our extension. | 193 // Starts the utility process that unpacks our extension. |
194 void StartProcessOnIOThread(const FilePath& temp_crx_path); | 194 void StartProcessOnIOThread(const FilePath& temp_crx_path); |
195 | 195 |
196 // UtilityProcessHost::Client | 196 // UtilityProcessHost::Client |
197 virtual bool OnMessageReceived(const IPC::Message& message); | 197 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
198 virtual void OnProcessCrashed(int exit_code); | 198 virtual void OnProcessCrashed(int exit_code) OVERRIDE; |
199 | 199 |
200 // IPC message handlers. | 200 // IPC message handlers. |
201 void OnUnpackExtensionSucceeded(const base::DictionaryValue& manifest); | 201 void OnUnpackExtensionSucceeded(const base::DictionaryValue& manifest); |
202 void OnUnpackExtensionFailed(const std::string& error_message); | 202 void OnUnpackExtensionFailed(const std::string& error_message); |
203 | 203 |
204 void ReportFailure(FailureReason reason, const std::string& message); | 204 void ReportFailure(FailureReason reason, const std::string& message); |
205 void ReportSuccess(const base::DictionaryValue& original_manifest); | 205 void ReportSuccess(const base::DictionaryValue& original_manifest); |
206 | 206 |
207 // Overwrites original manifest with safe result from utility process. | 207 // Overwrites original manifest with safe result from utility process. |
208 // Returns NULL on error. Caller owns the returned object. | 208 // Returns NULL on error. Caller owns the returned object. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 | 246 |
247 // Location to use for the unpacked extension. | 247 // Location to use for the unpacked extension. |
248 Extension::Location location_; | 248 Extension::Location location_; |
249 | 249 |
250 // Creation flags to use for the extension. These flags will be used | 250 // Creation flags to use for the extension. These flags will be used |
251 // when calling Extenion::Create() by the crx installer. | 251 // when calling Extenion::Create() by the crx installer. |
252 int creation_flags_; | 252 int creation_flags_; |
253 }; | 253 }; |
254 | 254 |
255 #endif // CHROME_BROWSER_EXTENSIONS_SANDBOXED_EXTENSION_UNPACKER_H_ | 255 #endif // CHROME_BROWSER_EXTENSIONS_SANDBOXED_EXTENSION_UNPACKER_H_ |
OLD | NEW |