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 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" | 5 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/crypto/signature_verifier.h" | 10 #include "base/crypto/signature_verifier.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 l10n_util::GetStringFUTF8( | 177 l10n_util::GetStringFUTF8( |
178 IDS_EXTENSION_PACKAGE_ERROR_MESSAGE, | 178 IDS_EXTENSION_PACKAGE_ERROR_MESSAGE, |
179 ASCIIToUTF16(error))); | 179 ASCIIToUTF16(error))); |
180 return; | 180 return; |
181 } | 181 } |
182 | 182 |
183 extension_ = Extension::Create( | 183 extension_ = Extension::Create( |
184 extension_root_, | 184 extension_root_, |
185 Extension::INTERNAL, | 185 Extension::INTERNAL, |
186 *final_manifest, | 186 *final_manifest, |
187 true, // Require key | 187 Extension::REQUIRE_KEY, |
188 false, // Disable strict error checks | |
189 &error); | 188 &error); |
190 | 189 |
191 if (!extension_.get()) { | 190 if (!extension_.get()) { |
192 ReportFailure( | 191 ReportFailure( |
193 INVALID_MANIFEST, | 192 INVALID_MANIFEST, |
194 std::string("Manifest is invalid: ") + error); | 193 std::string("Manifest is invalid: ") + error); |
195 return; | 194 return; |
196 } | 195 } |
197 | 196 |
198 if (!RewriteImageFiles()) | 197 if (!RewriteImageFiles()) |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 ERROR_SAVING_CATALOG, | 582 ERROR_SAVING_CATALOG, |
584 l10n_util::GetStringFUTF8( | 583 l10n_util::GetStringFUTF8( |
585 IDS_EXTENSION_PACKAGE_INSTALL_ERROR, | 584 IDS_EXTENSION_PACKAGE_INSTALL_ERROR, |
586 ASCIIToUTF16("ERROR_SAVING_CATALOG"))); | 585 ASCIIToUTF16("ERROR_SAVING_CATALOG"))); |
587 return false; | 586 return false; |
588 } | 587 } |
589 } | 588 } |
590 | 589 |
591 return true; | 590 return true; |
592 } | 591 } |
OLD | NEW |