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/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1162 | 1162 |
1163 void ExtensionService::NotifyExtensionUnloaded( | 1163 void ExtensionService::NotifyExtensionUnloaded( |
1164 const Extension* extension, | 1164 const Extension* extension, |
1165 extension_misc::UnloadedExtensionReason reason) { | 1165 extension_misc::UnloadedExtensionReason reason) { |
1166 UnloadedExtensionInfo details(extension, reason); | 1166 UnloadedExtensionInfo details(extension, reason); |
1167 content::NotificationService::current()->Notify( | 1167 content::NotificationService::current()->Notify( |
1168 chrome::NOTIFICATION_EXTENSION_UNLOADED, | 1168 chrome::NOTIFICATION_EXTENSION_UNLOADED, |
1169 content::Source<Profile>(profile_), | 1169 content::Source<Profile>(profile_), |
1170 content::Details<UnloadedExtensionInfo>(&details)); | 1170 content::Details<UnloadedExtensionInfo>(&details)); |
1171 | 1171 |
1172 #if defined(ENABLE_THEMES) | |
1173 // Let the ThemeService know that the theme has been unloaded. | |
1174 if (reason != extension_misc::UNLOAD_REASON_UPDATE && | |
1175 extension->id() == ThemeService::GetThemeIDForProfile(profile_)) { | |
akalin
2012/12/04 08:03:50
i actually had to revert my patch that changed thi
| |
1176 ThemeServiceFactory::GetForProfile(profile_)->UseDefaultTheme(); | |
1177 } | |
1178 #endif | |
1179 | |
1172 for (content::RenderProcessHost::iterator i( | 1180 for (content::RenderProcessHost::iterator i( |
1173 content::RenderProcessHost::AllHostsIterator()); | 1181 content::RenderProcessHost::AllHostsIterator()); |
1174 !i.IsAtEnd(); i.Advance()) { | 1182 !i.IsAtEnd(); i.Advance()) { |
1175 content::RenderProcessHost* host = i.GetCurrentValue(); | 1183 content::RenderProcessHost* host = i.GetCurrentValue(); |
1176 Profile* host_profile = | 1184 Profile* host_profile = |
1177 Profile::FromBrowserContext(host->GetBrowserContext()); | 1185 Profile::FromBrowserContext(host->GetBrowserContext()); |
1178 if (host_profile->GetOriginalProfile() == profile_->GetOriginalProfile()) | 1186 if (host_profile->GetOriginalProfile() == profile_->GetOriginalProfile()) |
1179 host->Send(new ExtensionMsg_Unloaded(extension->id())); | 1187 host->Send(new ExtensionMsg_Unloaded(extension->id())); |
1180 } | 1188 } |
1181 | 1189 |
(...skipping 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3029 extension_id, kOnUpdateAvailableEvent); | 3037 extension_id, kOnUpdateAvailableEvent); |
3030 } else { | 3038 } else { |
3031 // Delay installation if the extension is not idle. | 3039 // Delay installation if the extension is not idle. |
3032 return !IsExtensionIdle(extension_id); | 3040 return !IsExtensionIdle(extension_id); |
3033 } | 3041 } |
3034 } | 3042 } |
3035 | 3043 |
3036 void ExtensionService::OnBlacklistUpdated() { | 3044 void ExtensionService::OnBlacklistUpdated() { |
3037 CheckManagementPolicy(); | 3045 CheckManagementPolicy(); |
3038 } | 3046 } |
OLD | NEW |