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

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

Issue 369863002: Revert 281130 "Replace "external_install" boolean parameter with..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 | Annotate | Revision Log
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( 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698