Chromium Code Reviews| 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 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1040 } | 1040 } |
| 1041 | 1041 |
| 1042 void ExtensionService::NotifyExtensionUnloaded( | 1042 void ExtensionService::NotifyExtensionUnloaded( |
| 1043 const Extension* extension, | 1043 const Extension* extension, |
| 1044 extension_misc::UnloadedExtensionReason reason) { | 1044 extension_misc::UnloadedExtensionReason reason) { |
| 1045 UnloadedExtensionInfo details(extension, reason); | 1045 UnloadedExtensionInfo details(extension, reason); |
| 1046 content::NotificationService::current()->Notify( | 1046 content::NotificationService::current()->Notify( |
| 1047 chrome::NOTIFICATION_EXTENSION_UNLOADED, | 1047 chrome::NOTIFICATION_EXTENSION_UNLOADED, |
| 1048 content::Source<Profile>(profile_), | 1048 content::Source<Profile>(profile_), |
| 1049 content::Details<UnloadedExtensionInfo>(&details)); | 1049 content::Details<UnloadedExtensionInfo>(&details)); |
| 1050 if (profile_->HasOffTheRecordProfile()) { | |
| 1051 content::NotificationService::current()->Notify( | |
| 1052 chrome::NOTIFICATION_EXTENSION_UNLOADED, | |
| 1053 content::Source<Profile>(profile_->GetOffTheRecordProfile()), | |
| 1054 content::Details<UnloadedExtensionInfo>(&details)); | |
|
battre
2012/07/25 18:12:04
I wonder whether this change may have any negative
Matt Perry
2012/07/25 21:27:56
It's unconventional. Most of our notifications for
Yoyo Zhou
2012/07/25 21:44:45
I don't think this is a good idea. It's better to
battre
2012/07/26 16:38:43
Done.
| |
| 1055 } | |
| 1050 | 1056 |
| 1051 for (content::RenderProcessHost::iterator i( | 1057 for (content::RenderProcessHost::iterator i( |
| 1052 content::RenderProcessHost::AllHostsIterator()); | 1058 content::RenderProcessHost::AllHostsIterator()); |
| 1053 !i.IsAtEnd(); i.Advance()) { | 1059 !i.IsAtEnd(); i.Advance()) { |
| 1054 content::RenderProcessHost* host = i.GetCurrentValue(); | 1060 content::RenderProcessHost* host = i.GetCurrentValue(); |
| 1055 Profile* host_profile = | 1061 Profile* host_profile = |
| 1056 Profile::FromBrowserContext(host->GetBrowserContext()); | 1062 Profile::FromBrowserContext(host->GetBrowserContext()); |
| 1057 if (host_profile->GetOriginalProfile() == profile_->GetOriginalProfile()) | 1063 if (host_profile->GetOriginalProfile() == profile_->GetOriginalProfile()) |
| 1058 host->Send(new ExtensionMsg_Unloaded(extension->id())); | 1064 host->Send(new ExtensionMsg_Unloaded(extension->id())); |
| 1059 } | 1065 } |
| (...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2539 | 2545 |
| 2540 ExtensionService::NaClModuleInfoList::iterator | 2546 ExtensionService::NaClModuleInfoList::iterator |
| 2541 ExtensionService::FindNaClModule(const GURL& url) { | 2547 ExtensionService::FindNaClModule(const GURL& url) { |
| 2542 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2548 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
| 2543 iter != nacl_module_list_.end(); ++iter) { | 2549 iter != nacl_module_list_.end(); ++iter) { |
| 2544 if (iter->url == url) | 2550 if (iter->url == url) |
| 2545 return iter; | 2551 return iter; |
| 2546 } | 2552 } |
| 2547 return nacl_module_list_.end(); | 2553 return nacl_module_list_.end(); |
| 2548 } | 2554 } |
| OLD | NEW |