1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_CONSTANTS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_CONSTANTS_H_ 7 8 #include <stddef.h> 9 10 #include <string> 11 12 #include "extensions/common/manifest.h" 13 14 namespace extensions { 15 namespace schema_constants { 16 17 extern const char kWildcard[]; 18 19 extern const char kInstallationMode[]; 20 extern const char kAllowed[]; 21 extern const char kBlocked[]; 22 extern const char kForceInstalled[]; 23 extern const char kNormalInstalled[]; 24 extern const char kRemoved[]; 25 26 extern const char kBlockedPermissions[]; 27 extern const char kAllowedPermissions[]; 28 29 extern const char kPolicyBlockedHosts[]; 30 extern const char kPolicyAllowedHosts[]; 31 extern const size_t kMaxItemsURLPatternSet; 32 33 extern const char kUpdateUrl[]; 34 extern const char kInstallSources[]; 35 extern const char kAllowedTypes[]; 36 37 extern const char kMinimumVersionRequired[]; 38 39 extern const char kUpdateUrlPrefix[]; 40 41 extern const char kToolbarPin[]; 42 extern const char kForcePinned[]; 43 extern const char kDefaultUnpinned[]; 44 45 // If the install of an extension is blocked this admin defined message is 46 // appended to the error message displayed in the Chrome Webstore. 47 extern const char kBlockedInstallMessage[]; 48 49 struct AllowedTypesMapEntry { 50 // Name of allowed types of extensions used in schema of extension 51 // management preference. 52 const char* name; 53 // The corresponding Manifest::Type. 54 Manifest::Type manifest_type; 55 }; 56 57 extern const size_t kAllowedTypesMapSize; 58 extern const AllowedTypesMapEntry kAllowedTypesMap[]; 59 60 // Helper fuction over |kAllowedTypesMap|, returns Manifest::TYPE_UNKNOWN if 61 // not found. 62 Manifest::Type GetManifestType(const std::string& name); 63 64 } // namespace schema_constants 65 } // namespace extensions 66 67 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_CONSTANTS_H_ 68