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/common/extensions/extension.h" | 5 #include "chrome/common/extensions/extension.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 namespace keys = extension_manifest_keys; | 51 namespace keys = extension_manifest_keys; |
52 namespace values = extension_manifest_values; | 52 namespace values = extension_manifest_values; |
53 namespace errors = extension_manifest_errors; | 53 namespace errors = extension_manifest_errors; |
54 | 54 |
55 using extensions::csp_validator::ContentSecurityPolicyIsLegal; | 55 using extensions::csp_validator::ContentSecurityPolicyIsLegal; |
56 using extensions::csp_validator::ContentSecurityPolicyIsSecure; | 56 using extensions::csp_validator::ContentSecurityPolicyIsSecure; |
57 | 57 |
58 namespace { | 58 namespace { |
59 | 59 |
60 const int kModernManifestVersion = 1; | 60 const int kModernManifestVersion = 2; |
61 const int kPEMOutputColumns = 65; | 61 const int kPEMOutputColumns = 65; |
62 | 62 |
63 // KEY MARKERS | 63 // KEY MARKERS |
64 const char kKeyBeginHeaderMarker[] = "-----BEGIN"; | 64 const char kKeyBeginHeaderMarker[] = "-----BEGIN"; |
65 const char kKeyBeginFooterMarker[] = "-----END"; | 65 const char kKeyBeginFooterMarker[] = "-----END"; |
66 const char kKeyInfoEndMarker[] = "KEY-----"; | 66 const char kKeyInfoEndMarker[] = "KEY-----"; |
67 const char kPublic[] = "PUBLIC"; | 67 const char kPublic[] = "PUBLIC"; |
68 const char kPrivate[] = "PRIVATE"; | 68 const char kPrivate[] = "PRIVATE"; |
69 | 69 |
70 const int kRSAKeySize = 1024; | 70 const int kRSAKeySize = 1024; |
(...skipping 2928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2999 already_disabled(false), | 2999 already_disabled(false), |
3000 extension(extension) {} | 3000 extension(extension) {} |
3001 | 3001 |
3002 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 3002 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
3003 const Extension* extension, | 3003 const Extension* extension, |
3004 const ExtensionPermissionSet* permissions, | 3004 const ExtensionPermissionSet* permissions, |
3005 Reason reason) | 3005 Reason reason) |
3006 : reason(reason), | 3006 : reason(reason), |
3007 extension(extension), | 3007 extension(extension), |
3008 permissions(permissions) {} | 3008 permissions(permissions) {} |
OLD | NEW |