Index: chrome/browser/extensions/installed_loader.cc |
diff --git a/chrome/browser/extensions/installed_loader.cc b/chrome/browser/extensions/installed_loader.cc |
index ab16252f0df436508c00f4ed1db55d1644c44059..e8c557c8a500445c6254198af9206b2f400626a2 100644 |
--- a/chrome/browser/extensions/installed_loader.cc |
+++ b/chrome/browser/extensions/installed_loader.cc |
@@ -59,8 +59,9 @@ enum ManifestReloadReason { |
// long as existing values are not changed. |
enum BackgroundPageType { |
NO_BACKGROUND_PAGE = 0, |
- BACKGROUND_PAGE_PERSISTENT = 1, |
- EVENT_PAGE = 2, |
+ BACKGROUND_PAGE_PERSISTENT, |
+ EVENT_PAGE, |
+ NUM_BACKGROUND_PAGE_TYPES |
}; |
// Used in histogram Extensions.ExternalItemState. Values may be added, as |
@@ -223,7 +224,8 @@ void InstalledLoader::LoadAllExtensions() { |
ManifestReloadReason reload_reason = ShouldReloadExtensionManifest(*info); |
++reload_reason_counts[reload_reason]; |
UMA_HISTOGRAM_ENUMERATION("Extensions.ManifestReloadEnumValue", |
- reload_reason, 100); |
+ reload_reason, |
+ NUM_MANIFEST_RELOAD_REASONS); |
if (reload_reason != NOT_NEEDED) { |
// Reloading an extension reads files from disk. We do this on the |
@@ -316,13 +318,15 @@ void InstalledLoader::LoadAllExtensions() { |
// muck up any of the stats. Later, though, we want to omit component and |
// unpacked, as they are less interesting. |
if (extension->is_app()) |
- UMA_HISTOGRAM_ENUMERATION("Extensions.AppLocation", location, 100); |
+ UMA_HISTOGRAM_ENUMERATION( |
+ "Extensions.AppLocation", location, Manifest::NUM_LOCATIONS); |
else if (extension->is_extension()) |
- UMA_HISTOGRAM_ENUMERATION("Extensions.ExtensionLocation", location, 100); |
+ UMA_HISTOGRAM_ENUMERATION( |
+ "Extensions.ExtensionLocation", location, Manifest::NUM_LOCATIONS); |
if (!ManifestURL::UpdatesFromGallery(extension)) { |
UMA_HISTOGRAM_ENUMERATION( |
- "Extensions.NonWebstoreLocation", location, 100); |
+ "Extensions.NonWebstoreLocation", location, Manifest::NUM_LOCATIONS); |
// Check for inconsistencies if the extension was supposedly installed |
// from the webstore. |
@@ -378,13 +382,14 @@ void InstalledLoader::LoadAllExtensions() { |
if (type == Manifest::TYPE_EXTENSION) { |
UMA_HISTOGRAM_ENUMERATION("Extensions.BackgroundPageType", |
GetBackgroundPageType(extension), |
- 10); |
+ NUM_BACKGROUND_PAGE_TYPES); |
} |
// Using an enumeration shows us the total installed ratio across all users. |
// Using the totals per user at each startup tells us the distribution of |
// usage for each user (e.g. 40% of users have at least one app installed). |
- UMA_HISTOGRAM_ENUMERATION("Extensions.LoadType", type, 100); |
+ UMA_HISTOGRAM_ENUMERATION( |
+ "Extensions.LoadType", type, Manifest::NUM_LOAD_TYPES); |
switch (type) { |
case Manifest::TYPE_THEME: |
++theme_count; |