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 <iterator> | 8 #include <iterator> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 extensions::ExtensionHost* host = | 725 extensions::ExtensionHost* host = |
726 manager->GetBackgroundHostForExtension(extension_id); | 726 manager->GetBackgroundHostForExtension(extension_id); |
727 if (host && DevToolsAgentHost::HasFor(host->render_view_host())) { | 727 if (host && DevToolsAgentHost::HasFor(host->render_view_host())) { |
728 // Look for an open inspector for the background page. | 728 // Look for an open inspector for the background page. |
729 int devtools_cookie = DevToolsAgentHost::DisconnectRenderViewHost( | 729 int devtools_cookie = DevToolsAgentHost::DisconnectRenderViewHost( |
730 host->render_view_host()); | 730 host->render_view_host()); |
731 if (devtools_cookie >= 0) | 731 if (devtools_cookie >= 0) |
732 orphaned_dev_tools_[extension_id] = devtools_cookie; | 732 orphaned_dev_tools_[extension_id] = devtools_cookie; |
733 } | 733 } |
734 | 734 |
735 on_load_events_[extension_id] = events; | |
736 | |
737 path = current_extension->path(); | 735 path = current_extension->path(); |
738 DisableExtension(extension_id, Extension::DISABLE_RELOAD); | 736 DisableExtension(extension_id, Extension::DISABLE_RELOAD); |
739 disabled_extension_paths_[extension_id] = path; | 737 disabled_extension_paths_[extension_id] = path; |
740 } else { | 738 } else { |
741 path = unloaded_extension_paths_[extension_id]; | 739 path = unloaded_extension_paths_[extension_id]; |
742 } | 740 } |
743 | 741 |
| 742 on_load_events_[extension_id] = events; |
| 743 |
744 if (delayed_updates_for_idle_.Contains(extension_id)) { | 744 if (delayed_updates_for_idle_.Contains(extension_id)) { |
745 FinishDelayedInstallation(extension_id); | 745 FinishDelayedInstallation(extension_id); |
746 return; | 746 return; |
747 } | 747 } |
748 | 748 |
749 // If we're reloading a component extension, use the component extension | 749 // If we're reloading a component extension, use the component extension |
750 // loader's reloader. | 750 // loader's reloader. |
751 if (component_loader_->Exists(extension_id)) { | 751 if (component_loader_->Exists(extension_id)) { |
752 component_loader_->Reload(extension_id); | 752 component_loader_->Reload(extension_id); |
753 return; | 753 return; |
(...skipping 2361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3115 scoped_refptr<const Extension> extension = GetInstalledExtension(*it); | 3115 scoped_refptr<const Extension> extension = GetInstalledExtension(*it); |
3116 DCHECK(extension); | 3116 DCHECK(extension); |
3117 if (!extension) | 3117 if (!extension) |
3118 continue; | 3118 continue; |
3119 blacklisted_extensions_.Insert(extension); | 3119 blacklisted_extensions_.Insert(extension); |
3120 UnloadExtension(*it, extension_misc::UNLOAD_REASON_BLACKLIST); | 3120 UnloadExtension(*it, extension_misc::UNLOAD_REASON_BLACKLIST); |
3121 } | 3121 } |
3122 | 3122 |
3123 IdentifyAlertableExtensions(); | 3123 IdentifyAlertableExtensions(); |
3124 } | 3124 } |
OLD | NEW |