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; |
| 71 |
70 const char Extension::kMimeType[] = "application/x-chrome-extension"; | 72 const char Extension::kMimeType[] = "application/x-chrome-extension"; |
71 | 73 |
72 const int Extension::kValidWebExtentSchemes = | 74 const int Extension::kValidWebExtentSchemes = |
73 URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS; | 75 URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS; |
74 | 76 |
75 const int Extension::kValidHostPermissionSchemes = URLPattern::SCHEME_CHROMEUI | | 77 const int Extension::kValidHostPermissionSchemes = URLPattern::SCHEME_CHROMEUI | |
76 URLPattern::SCHEME_HTTP | | 78 URLPattern::SCHEME_HTTP | |
77 URLPattern::SCHEME_HTTPS | | 79 URLPattern::SCHEME_HTTPS | |
78 URLPattern::SCHEME_FILE | | 80 URLPattern::SCHEME_FILE | |
79 URLPattern::SCHEME_FTP; | 81 URLPattern::SCHEME_FTP; |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 | 783 |
782 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 784 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
783 const Extension* extension, | 785 const Extension* extension, |
784 const PermissionSet* permissions, | 786 const PermissionSet* permissions, |
785 Reason reason) | 787 Reason reason) |
786 : reason(reason), | 788 : reason(reason), |
787 extension(extension), | 789 extension(extension), |
788 permissions(permissions) {} | 790 permissions(permissions) {} |
789 | 791 |
790 } // namespace extensions | 792 } // namespace extensions |
OLD | NEW |