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 2164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2175 extension, "Extensions.Permissions_Install"); | 2175 extension, "Extensions.Permissions_Install"); |
2176 } else { | 2176 } else { |
2177 UMA_HISTOGRAM_ENUMERATION("Extensions.UpdateType", | 2177 UMA_HISTOGRAM_ENUMERATION("Extensions.UpdateType", |
2178 extension->GetType(), 100); | 2178 extension->GetType(), 100); |
2179 UMA_HISTOGRAM_ENUMERATION("Extensions.UpdateSource", | 2179 UMA_HISTOGRAM_ENUMERATION("Extensions.UpdateSource", |
2180 extension->location(), Manifest::NUM_LOCATIONS); | 2180 extension->location(), Manifest::NUM_LOCATIONS); |
2181 } | 2181 } |
2182 | 2182 |
2183 // Certain extension locations are specific enough that we can | 2183 // Certain extension locations are specific enough that we can |
2184 // auto-acknowledge any extension that came from one of them. | 2184 // auto-acknowledge any extension that came from one of them. |
2185 if (Manifest::IsPolicyLocation(extension->location())) | 2185 if (Manifest::IsPolicyLocation(extension->location()) || |
2186 extension->location() == Manifest::EXTERNAL_COMPONENT) | |
Andrew T Wilson (Slow)
2014/02/11 15:56:32
Just making sure that it's intentional that you ar
rpetterson
2014/02/11 18:34:18
Yes this is intentional. I'm keeping the same beha
| |
2186 AcknowledgeExternalExtension(extension->id()); | 2187 AcknowledgeExternalExtension(extension->id()); |
2187 const Extension::State initial_state = | 2188 const Extension::State initial_state = |
2188 initial_enable ? Extension::ENABLED : Extension::DISABLED; | 2189 initial_enable ? Extension::ENABLED : Extension::DISABLED; |
2189 const bool blacklisted_for_malware = | 2190 const bool blacklisted_for_malware = |
2190 blacklist_state == extensions::BLACKLISTED_MALWARE; | 2191 blacklist_state == extensions::BLACKLISTED_MALWARE; |
2191 if (ShouldDelayExtensionUpdate(id, wait_for_idle)) { | 2192 if (ShouldDelayExtensionUpdate(id, wait_for_idle)) { |
2192 extension_prefs_->SetDelayedInstallInfo( | 2193 extension_prefs_->SetDelayedInstallInfo( |
2193 extension, | 2194 extension, |
2194 initial_state, | 2195 initial_state, |
2195 blacklisted_for_malware, | 2196 blacklisted_for_malware, |
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2875 void ExtensionService::UnloadAllExtensionsInternal() { | 2876 void ExtensionService::UnloadAllExtensionsInternal() { |
2876 profile_->GetExtensionSpecialStoragePolicy()->RevokeRightsForAllExtensions(); | 2877 profile_->GetExtensionSpecialStoragePolicy()->RevokeRightsForAllExtensions(); |
2877 | 2878 |
2878 registry_->ClearAll(); | 2879 registry_->ClearAll(); |
2879 system_->runtime_data()->ClearAll(); | 2880 system_->runtime_data()->ClearAll(); |
2880 | 2881 |
2881 // TODO(erikkay) should there be a notification for this? We can't use | 2882 // TODO(erikkay) should there be a notification for this? We can't use |
2882 // EXTENSION_UNLOADED since that implies that the extension has been disabled | 2883 // EXTENSION_UNLOADED since that implies that the extension has been disabled |
2883 // or uninstalled. | 2884 // or uninstalled. |
2884 } | 2885 } |
OLD | NEW |