Chromium Code Reviews| 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..80c8326daa0f29ce759bc6743ba76e6aca9d4abe 100644 |
| --- a/chrome/browser/extensions/installed_loader.cc |
| +++ b/chrome/browser/extensions/installed_loader.cc |
| @@ -443,8 +443,10 @@ void InstalledLoader::LoadAllExtensions() { |
| extension, "Extensions.Permissions_Load"); |
| // For incognito and file access, skip anything that doesn't appear in |
| - // settings. |
| - if (extension->ShouldDisplayInExtensionSettings()) { |
| + // settings. Also, policy-installed and unpacked extensions are boring. |
| + if (extension->ShouldDisplayInExtensionSettings() && |
| + !Manifest::IsUnpackedLocation(extension->location()) && |
|
Devlin
2014/05/19 22:10:01
nit: You don't need the IsUnpacked check here, sin
not at google - send to devlin
2014/05/19 22:15:23
ah yes. when will I learn. fixed.
|
| + !Manifest::IsPolicyLocation(extension->location())) { |
| if (extension->can_be_incognito_enabled()) { |
| if (util::IsIncognitoEnabled(extension->id(), profile)) |
| ++incognito; |
| @@ -527,10 +529,15 @@ void InstalledLoader::LoadAllExtensions() { |
| disabled_for_permissions_count); |
| UMA_HISTOGRAM_COUNTS_100("Extensions.NonWebStoreNewTabPageOverrides", |
| non_webstore_ntp_override_count); |
| - UMA_HISTOGRAM_COUNTS_100("Extensions.IncognitoAllowed", incognito); |
| - UMA_HISTOGRAM_COUNTS_100("Extensions.IncognitoNotAllowed", not_incognito); |
| - UMA_HISTOGRAM_COUNTS_100("Extensions.FileAccessAllowed", file_access); |
| - UMA_HISTOGRAM_COUNTS_100("Extensions.FileAccessNotAllowed", not_file_access); |
| + if (incognito + not_incognito > 0) { |
| + UMA_HISTOGRAM_COUNTS_100("Extensions.IncognitoAllowed", incognito); |
| + UMA_HISTOGRAM_COUNTS_100("Extensions.IncognitoNotAllowed", not_incognito); |
| + } |
| + if (file_access + not_file_access > 0) { |
| + UMA_HISTOGRAM_COUNTS_100("Extensions.FileAccessAllowed", file_access); |
| + UMA_HISTOGRAM_COUNTS_100("Extensions.FileAccessNotAllowed", |
| + not_file_access); |
| + } |
| } |
| int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) { |