manifest.mojom 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Copyright 2021 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. module extensions.mojom;
  5. // Historically, where an extension was loaded from, and whether an
  6. // extension's files were inside or outside of the profile's directory. In
  7. // modern usage, a Location can be thought of as the installation source:
  8. // whether an extension was explicitly installed by the user (through the
  9. // UI), or implicitly installed by other means. For example, enterprise
  10. // policy, being part of Chrome per se (but implemented as an extension), or
  11. // installed as a side effect of installing third party software.
  12. //
  13. // NOTE: These values are stored as integers in the preferences and used
  14. // in histograms so don't remove or reorder existing items. Just append
  15. // to the end.
  16. enum ManifestLocation {
  17. kInvalidLocation = 0,
  18. kInternal = 1, // A crx file from the internal Extensions directory. This
  19. // includes extensions explicitly installed by the user. It
  20. // also includes installed-by-default extensions that are not
  21. // part of Chrome itself (and thus not a kComponent), but are
  22. // part of a larger system (such as Chrome OS).
  23. kExternalPref = 2, // A crx file from an external directory (via prefs).
  24. kExternalRegistry = 3, // A crx file from an external directory (via eg the
  25. // registry on Windows).
  26. kUnpacked = 4, // From loading an unpacked extension from the
  27. // extensions settings page.
  28. kComponent = 5, // An integral component of Chrome itself, which
  29. // happens to be implemented as an extension. We don't
  30. // show these in the management UI.
  31. kExternalPrefDownload = 6, // A crx file from an external directory (via
  32. // prefs), installed from an update URL.
  33. kExternalPolicyDownload = 7, // A crx file from an external directory (via
  34. // admin policies), installed from an update
  35. // URL.
  36. kCommandLine = 8, // --load-extension.
  37. kExternalPolicy = 9, // A crx file from an external directory (via admin
  38. // policies), cached locally and installed from the
  39. // cache.
  40. kExternalComponent = 10, // Similar to kComponent in that it's considered an
  41. // internal implementation detail of chrome, but
  42. // installed from an update URL like the *kDownload
  43. // ones.
  44. };