Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: chrome/browser/extensions/installed_loader.cc

Issue 482993003: Move logic to clear ExtensionAction values to ExtensionActionAPI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest master for CQ Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_action_manager.cc ('k') | chrome/browser/extensions/page_action_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698