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 CHROME_BROWSER_EXTENSIONS_SANDBOXED_UNPACKER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_SANDBOXED_UNPACKER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_SANDBOXED_UNPACKER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // was put here because we cannot run windows crypto code in the sandbox. But | 168 // was put here because we cannot run windows crypto code in the sandbox. But |
169 // we could still have this method statically on extensions::Unpacker so that | 169 // we could still have this method statically on extensions::Unpacker so that |
170 // code just for unpacking is there and code just for sandboxing of unpacking | 170 // code just for unpacking is there and code just for sandboxing of unpacking |
171 // is here. | 171 // is here. |
172 bool ValidateSignature(); | 172 bool ValidateSignature(); |
173 | 173 |
174 // Starts the utility process that unpacks our extension. | 174 // Starts the utility process that unpacks our extension. |
175 void StartProcessOnIOThread(const base::FilePath& temp_crx_path); | 175 void StartProcessOnIOThread(const base::FilePath& temp_crx_path); |
176 | 176 |
177 // UtilityProcessHostClient | 177 // UtilityProcessHostClient |
178 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 178 virtual bool OnMessageReceived(const IPC::Message& message) override; |
179 virtual void OnProcessCrashed(int exit_code) OVERRIDE; | 179 virtual void OnProcessCrashed(int exit_code) override; |
180 | 180 |
181 // IPC message handlers. | 181 // IPC message handlers. |
182 void OnUnpackExtensionSucceeded(const base::DictionaryValue& manifest); | 182 void OnUnpackExtensionSucceeded(const base::DictionaryValue& manifest); |
183 void OnUnpackExtensionFailed(const base::string16& error_message); | 183 void OnUnpackExtensionFailed(const base::string16& error_message); |
184 | 184 |
185 void ReportFailure(FailureReason reason, const base::string16& message); | 185 void ReportFailure(FailureReason reason, const base::string16& message); |
186 void ReportSuccess(const base::DictionaryValue& original_manifest, | 186 void ReportSuccess(const base::DictionaryValue& original_manifest, |
187 const SkBitmap& install_icon); | 187 const SkBitmap& install_icon); |
188 | 188 |
189 // Overwrites original manifest with safe result from utility process. | 189 // Overwrites original manifest with safe result from utility process. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 // when calling Extenion::Create() by the crx installer. | 237 // when calling Extenion::Create() by the crx installer. |
238 int creation_flags_; | 238 int creation_flags_; |
239 | 239 |
240 // Sequenced task runner where file I/O operations will be performed at. | 240 // Sequenced task runner where file I/O operations will be performed at. |
241 scoped_refptr<base::SequencedTaskRunner> unpacker_io_task_runner_; | 241 scoped_refptr<base::SequencedTaskRunner> unpacker_io_task_runner_; |
242 }; | 242 }; |
243 | 243 |
244 } // namespace extensions | 244 } // namespace extensions |
245 | 245 |
246 #endif // CHROME_BROWSER_EXTENSIONS_SANDBOXED_UNPACKER_H_ | 246 #endif // CHROME_BROWSER_EXTENSIONS_SANDBOXED_UNPACKER_H_ |
OLD | NEW |