Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: chrome/browser/extensions/sandboxed_extension_unpacker.h

Issue 3386014: This adds some plumbing for propagating the status and error code of a (Closed)
Patch Set: Fixed Mac code to handle both SEGV and BUS Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 void OnUnpackExtensionSucceeded(const DictionaryValue& manifest); 125 void OnUnpackExtensionSucceeded(const DictionaryValue& manifest);
126 void OnUnpackExtensionFailed(const std::string& error_message); 126 void OnUnpackExtensionFailed(const std::string& error_message);
127 void OnProcessCrashed(); 127 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
163 scoped_ptr<Extension> extension_; 163 scoped_ptr<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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698