| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 3000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3011 | 3011 |
| 3012 // Use AddExtensionImpl() as AddFrom*() would balk. | 3012 // Use AddExtensionImpl() as AddFrom*() would balk. |
| 3013 service()->pending_extension_manager()->AddExtensionImpl( | 3013 service()->pending_extension_manager()->AddExtensionImpl( |
| 3014 good->id(), | 3014 good->id(), |
| 3015 std::string(), | 3015 std::string(), |
| 3016 extensions::ManifestURL::GetUpdateURL(good), | 3016 extensions::ManifestURL::GetUpdateURL(good), |
| 3017 Version(), | 3017 Version(), |
| 3018 &IsExtension, | 3018 &IsExtension, |
| 3019 kGoodIsFromSync, | 3019 kGoodIsFromSync, |
| 3020 Manifest::INTERNAL, | 3020 Manifest::INTERNAL, |
| 3021 Extension::NO_FLAGS, |
| 3021 false, | 3022 false, |
| 3022 kGoodRemoteInstall); | 3023 kGoodRemoteInstall); |
| 3023 UpdateExtension(good->id(), path, ENABLED); | 3024 UpdateExtension(good->id(), path, ENABLED); |
| 3024 | 3025 |
| 3025 EXPECT_FALSE(service()->pending_extension_manager()->IsIdPending(kGoodId)); | 3026 EXPECT_FALSE(service()->pending_extension_manager()->IsIdPending(kGoodId)); |
| 3026 } | 3027 } |
| 3027 | 3028 |
| 3028 #if defined(ENABLE_BLACKLIST_TESTS) | 3029 #if defined(ENABLE_BLACKLIST_TESTS) |
| 3029 // Tests blacklisting then unblacklisting extensions after the service has been | 3030 // Tests blacklisting then unblacklisting extensions after the service has been |
| 3030 // initialized. | 3031 // initialized. |
| (...skipping 3805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6836 | 6837 |
| 6837 service()->Observe(chrome::NOTIFICATION_PROFILE_DESTRUCTION_STARTED, | 6838 service()->Observe(chrome::NOTIFICATION_PROFILE_DESTRUCTION_STARTED, |
| 6838 content::Source<Profile>(profile()), | 6839 content::Source<Profile>(profile()), |
| 6839 content::NotificationService::NoDetails()); | 6840 content::NotificationService::NoDetails()); |
| 6840 EXPECT_EQ(UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN, unloaded_reason_); | 6841 EXPECT_EQ(UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN, unloaded_reason_); |
| 6841 EXPECT_EQ(0u, registry()->enabled_extensions().size()); | 6842 EXPECT_EQ(0u, registry()->enabled_extensions().size()); |
| 6842 EXPECT_EQ(0u, registry()->disabled_extensions().size()); | 6843 EXPECT_EQ(0u, registry()->disabled_extensions().size()); |
| 6843 EXPECT_EQ(0u, registry()->terminated_extensions().size()); | 6844 EXPECT_EQ(0u, registry()->terminated_extensions().size()); |
| 6844 EXPECT_EQ(0u, registry()->blacklisted_extensions().size()); | 6845 EXPECT_EQ(0u, registry()->blacklisted_extensions().size()); |
| 6845 } | 6846 } |
| OLD | NEW |