Chromium Code Reviews| 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 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1025 if (!extension->is_theme()) { | 1025 if (!extension->is_theme()) { |
| 1026 for (content::RenderProcessHost::iterator i( | 1026 for (content::RenderProcessHost::iterator i( |
| 1027 content::RenderProcessHost::AllHostsIterator()); | 1027 content::RenderProcessHost::AllHostsIterator()); |
| 1028 !i.IsAtEnd(); i.Advance()) { | 1028 !i.IsAtEnd(); i.Advance()) { |
| 1029 content::RenderProcessHost* host = i.GetCurrentValue(); | 1029 content::RenderProcessHost* host = i.GetCurrentValue(); |
| 1030 Profile* host_profile = | 1030 Profile* host_profile = |
| 1031 Profile::FromBrowserContext(host->GetBrowserContext()); | 1031 Profile::FromBrowserContext(host->GetBrowserContext()); |
| 1032 if (host_profile->GetOriginalProfile() == | 1032 if (host_profile->GetOriginalProfile() == |
| 1033 profile_->GetOriginalProfile()) { | 1033 profile_->GetOriginalProfile()) { |
| 1034 std::vector<ExtensionMsg_Loaded_Params> loaded_extensions( | 1034 std::vector<ExtensionMsg_Loaded_Params> loaded_extensions( |
| 1035 1, ExtensionMsg_Loaded_Params(extension)); | 1035 1, ExtensionMsg_Loaded_Params(extension, false)); |
|
not at google - send to devlin
2015/02/05 00:16:13
document this (what does false mean / why is it se
Devlin
2015/02/05 19:54:50
Done.
| |
| 1036 host->Send( | 1036 host->Send( |
| 1037 new ExtensionMsg_Loaded(loaded_extensions)); | 1037 new ExtensionMsg_Loaded(loaded_extensions)); |
| 1038 } | 1038 } |
| 1039 } | 1039 } |
| 1040 } | 1040 } |
| 1041 | 1041 |
| 1042 // Tell subsystems that use the EXTENSION_LOADED notification about the new | 1042 // Tell subsystems that use the EXTENSION_LOADED notification about the new |
| 1043 // extension. | 1043 // extension. |
| 1044 // | 1044 // |
| 1045 // NOTE: It is important that this happen after notifying the renderers about | 1045 // NOTE: It is important that this happen after notifying the renderers about |
| (...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2544 } | 2544 } |
| 2545 | 2545 |
| 2546 void ExtensionService::OnProfileDestructionStarted() { | 2546 void ExtensionService::OnProfileDestructionStarted() { |
| 2547 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); | 2547 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); |
| 2548 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); | 2548 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); |
| 2549 it != ids_to_unload.end(); | 2549 it != ids_to_unload.end(); |
| 2550 ++it) { | 2550 ++it) { |
| 2551 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); | 2551 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); |
| 2552 } | 2552 } |
| 2553 } | 2553 } |
| OLD | NEW |