| 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 #include "chrome/browser/extensions/crx_file.h" | 5 #include "extensions/common/crx_file.h" |
| 6 | 6 |
| 7 namespace extensions { | 7 namespace extensions { |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| 11 // The current version of the crx format. | 11 // The current version of the crx format. |
| 12 static const uint32 kCurrentVersion = 2; | 12 static const uint32 kCurrentVersion = 2; |
| 13 | 13 |
| 14 // The maximum size the crx parser will tolerate for a public key. | 14 // The maximum size the crx parser will tolerate for a public key. |
| 15 static const uint32 kMaxPublicKeySize = 1 << 16; | 15 static const uint32 kMaxPublicKeySize = 1 << 16; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 else if (header.signature_size > kMaxSignatureSize) | 59 else if (header.signature_size > kMaxSignatureSize) |
| 60 *error = kInvalidSignatureTooLarge; | 60 *error = kInvalidSignatureTooLarge; |
| 61 else if (header.signature_size == 0) | 61 else if (header.signature_size == 0) |
| 62 *error = kInvalidSignatureTooSmall; | 62 *error = kInvalidSignatureTooSmall; |
| 63 else | 63 else |
| 64 valid = true; | 64 valid = true; |
| 65 return valid; | 65 return valid; |
| 66 } | 66 } |
| 67 | 67 |
| 68 } // namespace extensions | 68 } // namespace extensions |
| OLD | NEW |