OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "extensions/common/extension.h" | 5 #include "extensions/common/extension.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // Extensions are cross-platform. | 60 // Extensions are cross-platform. |
61 // Since FilePath uses backslash '\\' as file path separator on Windows, so we | 61 // Since FilePath uses backslash '\\' as file path separator on Windows, so we |
62 // need to check manually. | 62 // need to check manually. |
63 if (path.value().find('\\') != path.value().npos) | 63 if (path.value().find('\\') != path.value().npos) |
64 return true; | 64 return true; |
65 return !net::IsSafePortableRelativePath(path); | 65 return !net::IsSafePortableRelativePath(path); |
66 } | 66 } |
67 | 67 |
68 } // namespace | 68 } // namespace |
69 | 69 |
70 const int Extension::kInitFromValueFlagBits = 11; | 70 const int Extension::kInitFromValueFlagBits = 12; |
71 | 71 |
72 const char Extension::kMimeType[] = "application/x-chrome-extension"; | 72 const char Extension::kMimeType[] = "application/x-chrome-extension"; |
73 | 73 |
74 const int Extension::kValidWebExtentSchemes = | 74 const int Extension::kValidWebExtentSchemes = |
75 URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS; | 75 URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS; |
76 | 76 |
77 const int Extension::kValidHostPermissionSchemes = URLPattern::SCHEME_CHROMEUI | | 77 const int Extension::kValidHostPermissionSchemes = URLPattern::SCHEME_CHROMEUI | |
78 URLPattern::SCHEME_HTTP | | 78 URLPattern::SCHEME_HTTP | |
79 URLPattern::SCHEME_HTTPS | | 79 URLPattern::SCHEME_HTTPS | |
80 URLPattern::SCHEME_FILE | | 80 URLPattern::SCHEME_FILE | |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 | 775 |
776 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 776 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
777 const Extension* extension, | 777 const Extension* extension, |
778 const PermissionSet* permissions, | 778 const PermissionSet* permissions, |
779 Reason reason) | 779 Reason reason) |
780 : reason(reason), | 780 : reason(reason), |
781 extension(extension), | 781 extension(extension), |
782 permissions(permissions) {} | 782 permissions(permissions) {} |
783 | 783 |
784 } // namespace extensions | 784 } // namespace extensions |
OLD | NEW |