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/common/extensions/extension.h" | 5 #include "chrome/common/extensions/extension.h" |
6 | 6 |
7 #include <ostream> | 7 #include <ostream> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1661 } else { | 1661 } else { |
1662 sandboxed_pages_content_security_policy_ = | 1662 sandboxed_pages_content_security_policy_ = |
1663 kDefaultSandboxedPageContentSecurityPolicy; | 1663 kDefaultSandboxedPageContentSecurityPolicy; |
1664 CHECK(ContentSecurityPolicyIsSandboxed( | 1664 CHECK(ContentSecurityPolicyIsSandboxed( |
1665 sandboxed_pages_content_security_policy_, GetType())); | 1665 sandboxed_pages_content_security_policy_, GetType())); |
1666 } | 1666 } |
1667 | 1667 |
1668 return true; | 1668 return true; |
1669 } | 1669 } |
1670 | 1670 |
1671 // These are not actually persisted (they're only used by the store), but | |
1672 // still validated. | |
1673 bool Extension::CheckRequirements(string16* error) { | 1671 bool Extension::CheckRequirements(string16* error) { |
1674 if (!manifest_->HasKey(keys::kRequirements)) | 1672 if (!manifest_->HasKey(keys::kRequirements)) |
1675 return true; | 1673 return true; |
1676 DictionaryValue* requirements_value = NULL; | 1674 DictionaryValue* requirements_value = NULL; |
1677 if (!manifest_->GetDictionary(keys::kRequirements, &requirements_value)) { | 1675 if (!manifest_->GetDictionary(keys::kRequirements, &requirements_value)) { |
1678 *error = ASCIIToUTF16(errors::kInvalidRequirements); | 1676 *error = ASCIIToUTF16(errors::kInvalidRequirements); |
1679 return false; | 1677 return false; |
1680 } | 1678 } |
1681 | 1679 |
1682 for (DictionaryValue::key_iterator it = requirements_value->begin_keys(); | 1680 for (DictionaryValue::key_iterator it = requirements_value->begin_keys(); |
(...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3870 | 3868 |
3871 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 3869 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
3872 const Extension* extension, | 3870 const Extension* extension, |
3873 const PermissionSet* permissions, | 3871 const PermissionSet* permissions, |
3874 Reason reason) | 3872 Reason reason) |
3875 : reason(reason), | 3873 : reason(reason), |
3876 extension(extension), | 3874 extension(extension), |
3877 permissions(permissions) {} | 3875 permissions(permissions) {} |
3878 | 3876 |
3879 } // namespace extensions | 3877 } // namespace extensions |
OLD | NEW |