Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: chrome/browser/extensions/shared_module_service.cc

Issue 284103002: Replace "external_install" boolean parameter with explicit enumeration in ExtensionUninstall method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address issue exposed by failing unit test. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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(iter->extension_id, 155 service->UninstallExtension(
156 true, // External uninstall. 156 iter->extension_id,
157 NULL); // Ignore error. 157 ExtensionService::UNINSTALL_REASON_ORPHANED_SHARED_MODULE,
158 NULL); // Ignore error.
158 } 159 }
159 } 160 }
160 } 161 }
161 } 162 }
162 163
163 } // namespace extensions 164 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/external_install_error.cc ('k') | chrome/browser/extensions/shared_module_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698