OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/shared_module_service.h" | 5 #include "chrome/browser/extensions/shared_module_service.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 pending_extension_manager->AddFromExtensionImport( | 101 pending_extension_manager->AddFromExtensionImport( |
102 iter->extension_id, | 102 iter->extension_id, |
103 extension_urls::GetWebstoreUpdateUrl(), | 103 extension_urls::GetWebstoreUpdateUrl(), |
104 SharedModuleInfo::IsSharedModule); | 104 SharedModuleInfo::IsSharedModule); |
105 } | 105 } |
106 service->CheckForUpdatesSoon(); | 106 service->CheckForUpdatesSoon(); |
107 } | 107 } |
108 return status; | 108 return status; |
109 } | 109 } |
110 | 110 |
111 scoped_ptr<ExtensionSet> SharedModuleService::GetDependentExtensions( | 111 std::unique_ptr<ExtensionSet> SharedModuleService::GetDependentExtensions( |
112 const Extension* extension) { | 112 const Extension* extension) { |
113 scoped_ptr<ExtensionSet> dependents(new ExtensionSet()); | 113 std::unique_ptr<ExtensionSet> dependents(new ExtensionSet()); |
114 | 114 |
115 if (SharedModuleInfo::IsSharedModule(extension)) { | 115 if (SharedModuleInfo::IsSharedModule(extension)) { |
116 ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context_); | 116 ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context_); |
117 ExtensionService* service = | 117 ExtensionService* service = |
118 ExtensionSystem::Get(browser_context_)->extension_service(); | 118 ExtensionSystem::Get(browser_context_)->extension_service(); |
119 | 119 |
120 ExtensionSet set_to_check; | 120 ExtensionSet set_to_check; |
121 set_to_check.InsertAll(registry->enabled_extensions()); | 121 set_to_check.InsertAll(registry->enabled_extensions()); |
122 set_to_check.InsertAll(registry->disabled_extensions()); | 122 set_to_check.InsertAll(registry->disabled_extensions()); |
123 set_to_check.InsertAll(*service->delayed_installs()); | 123 set_to_check.InsertAll(*service->delayed_installs()); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 extensions::UninstallReason reason) { | 189 extensions::UninstallReason reason) { |
190 // Do not call PruneSharedModules() for an uninstall that we were responsible | 190 // Do not call PruneSharedModules() for an uninstall that we were responsible |
191 // for. | 191 // for. |
192 if (reason == extensions::UNINSTALL_REASON_ORPHANED_SHARED_MODULE) | 192 if (reason == extensions::UNINSTALL_REASON_ORPHANED_SHARED_MODULE) |
193 return; | 193 return; |
194 | 194 |
195 PruneSharedModules(); | 195 PruneSharedModules(); |
196 } | 196 } |
197 | 197 |
198 } // namespace extensions | 198 } // namespace extensions |
OLD | NEW |