| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 UMA_HISTOGRAM_COUNTS_100("Extensions.EventlessEventPages", | 602 UMA_HISTOGRAM_COUNTS_100("Extensions.EventlessEventPages", |
| 603 eventless_event_pages_count); | 603 eventless_event_pages_count); |
| 604 } | 604 } |
| 605 | 605 |
| 606 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) { | 606 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) { |
| 607 int flags = extension_prefs_->GetCreationFlags(info->extension_id); | 607 int flags = extension_prefs_->GetCreationFlags(info->extension_id); |
| 608 if (!Manifest::IsUnpackedLocation(info->extension_location)) | 608 if (!Manifest::IsUnpackedLocation(info->extension_location)) |
| 609 flags |= Extension::REQUIRE_KEY; | 609 flags |= Extension::REQUIRE_KEY; |
| 610 if (extension_prefs_->AllowFileAccess(info->extension_id)) | 610 if (extension_prefs_->AllowFileAccess(info->extension_id)) |
| 611 flags |= Extension::ALLOW_FILE_ACCESS; | 611 flags |= Extension::ALLOW_FILE_ACCESS; |
| 612 if (extension_prefs_->WasInstalledByCustodian(info->extension_id)) |
| 613 flags |= Extension::WAS_INSTALLED_BY_CUSTODIAN; |
| 612 return flags; | 614 return flags; |
| 613 } | 615 } |
| 614 | 616 |
| 615 } // namespace extensions | 617 } // namespace extensions |
| OLD | NEW |