| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/version.h" | 9 #include "base/version.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 for (ImportInfoVector::const_iterator iter = imports.begin(); | 145 for (ImportInfoVector::const_iterator iter = imports.begin(); |
| 146 iter != imports.end(); | 146 iter != imports.end(); |
| 147 ++iter) { | 147 ++iter) { |
| 148 const Extension* imported_module = | 148 const Extension* imported_module = |
| 149 registry->GetExtensionById(iter->extension_id, | 149 registry->GetExtensionById(iter->extension_id, |
| 150 ExtensionRegistry::EVERYTHING); | 150 ExtensionRegistry::EVERYTHING); |
| 151 if (imported_module && imported_module->from_webstore()) { | 151 if (imported_module && imported_module->from_webstore()) { |
| 152 scoped_ptr<ExtensionSet> dependents = | 152 scoped_ptr<ExtensionSet> dependents = |
| 153 GetDependentExtensions(imported_module); | 153 GetDependentExtensions(imported_module); |
| 154 if (dependents->is_empty()) { | 154 if (dependents->is_empty()) { |
| 155 service->UninstallExtension( | 155 service->UninstallExtension(iter->extension_id, |
| 156 iter->extension_id, | 156 true, // External uninstall. |
| 157 ExtensionService::UNINSTALL_REASON_ORPHANED_SHARED_MODULE, | 157 NULL); // Ignore error. |
| 158 NULL); // Ignore error. | |
| 159 } | 158 } |
| 160 } | 159 } |
| 161 } | 160 } |
| 162 } | 161 } |
| 163 | 162 |
| 164 } // namespace extensions | 163 } // namespace extensions |
| OLD | NEW |