OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/extensions/installed_loader.h" | 5 #include "chrome/browser/extensions/installed_loader.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/metrics/sparse_histogram.h" | 9 #include "base/metrics/sparse_histogram.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 legacy_packaged_app_count); | 538 legacy_packaged_app_count); |
539 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadPlatformApp", platform_app_count); | 539 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadPlatformApp", platform_app_count); |
540 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadExtension", | 540 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadExtension", |
541 extension_user_count + extension_external_count); | 541 extension_user_count + extension_external_count); |
542 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadExtensionUser", | 542 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadExtensionUser", |
543 extension_user_count); | 543 extension_user_count); |
544 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadExtensionExternal", | 544 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadExtensionExternal", |
545 extension_external_count); | 545 extension_external_count); |
546 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadUserScript", user_script_count); | 546 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadUserScript", user_script_count); |
547 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadTheme", theme_count); | 547 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadTheme", theme_count); |
548 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadPageAction", page_action_count); | 548 // Histogram name different for legacy reasons. |
| 549 UMA_HISTOGRAM_COUNTS_100("PageActionController.ExtensionsWithPageActions", |
| 550 page_action_count); |
549 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadBrowserAction", | 551 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadBrowserAction", |
550 browser_action_count); | 552 browser_action_count); |
551 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadContentPack", content_pack_count); | 553 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadContentPack", content_pack_count); |
552 UMA_HISTOGRAM_COUNTS_100("Extensions.DisabledForPermissions", | 554 UMA_HISTOGRAM_COUNTS_100("Extensions.DisabledForPermissions", |
553 disabled_for_permissions_count); | 555 disabled_for_permissions_count); |
554 UMA_HISTOGRAM_COUNTS_100("Extensions.NonWebStoreNewTabPageOverrides", | 556 UMA_HISTOGRAM_COUNTS_100("Extensions.NonWebStoreNewTabPageOverrides", |
555 non_webstore_ntp_override_count); | 557 non_webstore_ntp_override_count); |
556 if (incognito_allowed_count + incognito_not_allowed_count > 0) { | 558 if (incognito_allowed_count + incognito_not_allowed_count > 0) { |
557 UMA_HISTOGRAM_COUNTS_100("Extensions.IncognitoAllowed", | 559 UMA_HISTOGRAM_COUNTS_100("Extensions.IncognitoAllowed", |
558 incognito_allowed_count); | 560 incognito_allowed_count); |
(...skipping 13 matching lines...) Expand all Loading... |
572 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) { | 574 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) { |
573 int flags = extension_prefs_->GetCreationFlags(info->extension_id); | 575 int flags = extension_prefs_->GetCreationFlags(info->extension_id); |
574 if (!Manifest::IsUnpackedLocation(info->extension_location)) | 576 if (!Manifest::IsUnpackedLocation(info->extension_location)) |
575 flags |= Extension::REQUIRE_KEY; | 577 flags |= Extension::REQUIRE_KEY; |
576 if (extension_prefs_->AllowFileAccess(info->extension_id)) | 578 if (extension_prefs_->AllowFileAccess(info->extension_id)) |
577 flags |= Extension::ALLOW_FILE_ACCESS; | 579 flags |= Extension::ALLOW_FILE_ACCESS; |
578 return flags; | 580 return flags; |
579 } | 581 } |
580 | 582 |
581 } // namespace extensions | 583 } // namespace extensions |
OLD | NEW |