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/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 | 435 |
436 if (extension_action_manager->GetBrowserAction(*extension)) | 436 if (extension_action_manager->GetBrowserAction(*extension)) |
437 ++browser_action_count; | 437 ++browser_action_count; |
438 | 438 |
439 if (ManagedModeInfo::IsContentPack(extension)) | 439 if (ManagedModeInfo::IsContentPack(extension)) |
440 ++content_pack_count; | 440 ++content_pack_count; |
441 | 441 |
442 RecordCreationFlags(extension); | 442 RecordCreationFlags(extension); |
443 | 443 |
444 ExtensionService::RecordPermissionMessagesHistogram( | 444 ExtensionService::RecordPermissionMessagesHistogram( |
445 extension, "Extensions.Permissions_Load"); | 445 extension, "Extensions.Permissions_Load2"); |
446 | 446 |
447 // For incognito and file access, skip anything that doesn't appear in | 447 // For incognito and file access, skip anything that doesn't appear in |
448 // settings. Also, policy-installed (and unpacked of course, checked above) | 448 // settings. Also, policy-installed (and unpacked of course, checked above) |
449 // extensions are boring. | 449 // extensions are boring. |
450 if (extension->ShouldDisplayInExtensionSettings() && | 450 if (extension->ShouldDisplayInExtensionSettings() && |
451 !Manifest::IsPolicyLocation(extension->location())) { | 451 !Manifest::IsPolicyLocation(extension->location())) { |
452 if (extension->can_be_incognito_enabled()) { | 452 if (extension->can_be_incognito_enabled()) { |
453 if (util::IsIncognitoEnabled(extension->id(), profile)) | 453 if (util::IsIncognitoEnabled(extension->id(), profile)) |
454 ++incognito_allowed_count; | 454 ++incognito_allowed_count; |
455 else | 455 else |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) { | 547 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) { |
548 int flags = extension_prefs_->GetCreationFlags(info->extension_id); | 548 int flags = extension_prefs_->GetCreationFlags(info->extension_id); |
549 if (!Manifest::IsUnpackedLocation(info->extension_location)) | 549 if (!Manifest::IsUnpackedLocation(info->extension_location)) |
550 flags |= Extension::REQUIRE_KEY; | 550 flags |= Extension::REQUIRE_KEY; |
551 if (extension_prefs_->AllowFileAccess(info->extension_id)) | 551 if (extension_prefs_->AllowFileAccess(info->extension_id)) |
552 flags |= Extension::ALLOW_FILE_ACCESS; | 552 flags |= Extension::ALLOW_FILE_ACCESS; |
553 return flags; | 553 return flags; |
554 } | 554 } |
555 | 555 |
556 } // namespace extensions | 556 } // namespace extensions |
OLD | NEW |