| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/metrics/field_trial.h" | 12 #include "base/metrics/field_trial.h" |
| 13 #include "base/test/mock_entropy_provider.h" | 13 #include "base/test/mock_entropy_provider.h" |
| 14 #include "chrome/browser/extensions/component_loader.h" | 14 #include "chrome/browser/extensions/component_loader.h" |
| 15 #include "chrome/browser/extensions/extension_service.h" | 15 #include "chrome/browser/extensions/extension_service.h" |
| 16 #include "chrome/browser/extensions/extension_service_test_with_install.h" | 16 #include "chrome/browser/extensions/extension_service_test_with_install.h" |
| 17 #include "chrome/browser/extensions/extension_sync_data.h" | 17 #include "chrome/browser/extensions/extension_sync_data.h" |
| 18 #include "chrome/browser/extensions/extension_sync_service.h" | 18 #include "chrome/browser/extensions/extension_sync_service.h" |
| 19 #include "chrome/browser/extensions/extension_util.h" | 19 #include "chrome/browser/extensions/extension_util.h" |
| 20 #include "chrome/browser/extensions/updater/extension_updater.h" | 20 #include "chrome/browser/extensions/updater/extension_updater.h" |
| 21 #include "chrome/browser/sync/profile_sync_service.h" | |
| 22 #include "chrome/browser/sync/profile_sync_service_factory.h" | 21 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 23 #include "chrome/common/chrome_constants.h" | 22 #include "chrome/common/chrome_constants.h" |
| 24 #include "chrome/common/chrome_switches.h" | 23 #include "chrome/common/chrome_switches.h" |
| 25 #include "chrome/common/extensions/sync_helper.h" | 24 #include "chrome/common/extensions/sync_helper.h" |
| 26 #include "chrome/test/base/testing_profile.h" | 25 #include "chrome/test/base/testing_profile.h" |
| 26 #include "components/browser_sync/browser/profile_sync_service.h" |
| 27 #include "extensions/browser/app_sorting.h" | 27 #include "extensions/browser/app_sorting.h" |
| 28 #include "extensions/browser/extension_prefs.h" | 28 #include "extensions/browser/extension_prefs.h" |
| 29 #include "extensions/browser/extension_registry.h" | 29 #include "extensions/browser/extension_registry.h" |
| 30 #include "extensions/browser/extension_system.h" | 30 #include "extensions/browser/extension_system.h" |
| 31 #include "extensions/browser/management_policy.h" | 31 #include "extensions/browser/management_policy.h" |
| 32 #include "extensions/browser/test_management_policy.h" | 32 #include "extensions/browser/test_management_policy.h" |
| 33 #include "extensions/common/constants.h" | 33 #include "extensions/common/constants.h" |
| 34 #include "extensions/common/manifest_url_handlers.h" | 34 #include "extensions/common/manifest_url_handlers.h" |
| 35 #include "extensions/common/permissions/permission_set.h" | 35 #include "extensions/common/permissions/permission_set.h" |
| 36 #include "sync/api/fake_sync_change_processor.h" | 36 #include "sync/api/fake_sync_change_processor.h" |
| (...skipping 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1710 // Uninstalling the extension without installed_by_custodian should have been | 1710 // Uninstalling the extension without installed_by_custodian should have been |
| 1711 // blocked by policy, so it should still be there. | 1711 // blocked by policy, so it should still be there. |
| 1712 EXPECT_TRUE(registry()->enabled_extensions().Contains(extension_ids[0])); | 1712 EXPECT_TRUE(registry()->enabled_extensions().Contains(extension_ids[0])); |
| 1713 | 1713 |
| 1714 // But installed_by_custodian should result in bypassing the policy check. | 1714 // But installed_by_custodian should result in bypassing the policy check. |
| 1715 EXPECT_FALSE( | 1715 EXPECT_FALSE( |
| 1716 registry()->GenerateInstalledExtensionsSet()->Contains(extension_ids[1])); | 1716 registry()->GenerateInstalledExtensionsSet()->Contains(extension_ids[1])); |
| 1717 } | 1717 } |
| 1718 | 1718 |
| 1719 #endif // defined(ENABLE_SUPERVISED_USERS) | 1719 #endif // defined(ENABLE_SUPERVISED_USERS) |
| OLD | NEW |