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 <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 2594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2605 } | 2605 } |
2606 | 2606 |
2607 void ExtensionService::OnBlacklistUpdated() { | 2607 void ExtensionService::OnBlacklistUpdated() { |
2608 blacklist_->GetBlacklistedIDs( | 2608 blacklist_->GetBlacklistedIDs( |
2609 registry_->GenerateInstalledExtensionsSet()->GetIDs(), | 2609 registry_->GenerateInstalledExtensionsSet()->GetIDs(), |
2610 base::Bind(&ExtensionService::ManageBlacklist, AsWeakPtr())); | 2610 base::Bind(&ExtensionService::ManageBlacklist, AsWeakPtr())); |
2611 } | 2611 } |
2612 | 2612 |
2613 void ExtensionService::ManageBlacklist( | 2613 void ExtensionService::ManageBlacklist( |
2614 const extensions::Blacklist::BlacklistStateMap& state_map) { | 2614 const extensions::Blacklist::BlacklistStateMap& state_map) { |
2615 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 2615 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2616 | 2616 |
2617 std::set<std::string> blocked; | 2617 std::set<std::string> blocked; |
2618 ExtensionIdSet greylist; | 2618 ExtensionIdSet greylist; |
2619 ExtensionIdSet unchanged; | 2619 ExtensionIdSet unchanged; |
2620 for (extensions::Blacklist::BlacklistStateMap::const_iterator it = | 2620 for (extensions::Blacklist::BlacklistStateMap::const_iterator it = |
2621 state_map.begin(); | 2621 state_map.begin(); |
2622 it != state_map.end(); | 2622 it != state_map.end(); |
2623 ++it) { | 2623 ++it) { |
2624 switch (it->second) { | 2624 switch (it->second) { |
2625 case extensions::NOT_BLACKLISTED: | 2625 case extensions::NOT_BLACKLISTED: |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2757 void ExtensionService::UnloadAllExtensionsInternal() { | 2757 void ExtensionService::UnloadAllExtensionsInternal() { |
2758 profile_->GetExtensionSpecialStoragePolicy()->RevokeRightsForAllExtensions(); | 2758 profile_->GetExtensionSpecialStoragePolicy()->RevokeRightsForAllExtensions(); |
2759 | 2759 |
2760 registry_->ClearAll(); | 2760 registry_->ClearAll(); |
2761 system_->runtime_data()->ClearAll(); | 2761 system_->runtime_data()->ClearAll(); |
2762 | 2762 |
2763 // TODO(erikkay) should there be a notification for this? We can't use | 2763 // TODO(erikkay) should there be a notification for this? We can't use |
2764 // EXTENSION_UNLOADED since that implies that the extension has been disabled | 2764 // EXTENSION_UNLOADED since that implies that the extension has been disabled |
2765 // or uninstalled. | 2765 // or uninstalled. |
2766 } | 2766 } |
OLD | NEW |