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

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

Issue 421193002: Fix ExtensionServiceTest.ClearExtensionData flakiness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use base::DoNothing for empty callbacks Created 6 years, 4 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 <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/version.h" 10 #include "base/version.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 std::vector<std::string>::const_iterator shared_modules_iter; 162 std::vector<std::string>::const_iterator shared_modules_iter;
163 for (shared_modules_iter = shared_modules.begin(); 163 for (shared_modules_iter = shared_modules.begin();
164 shared_modules_iter != shared_modules.end(); 164 shared_modules_iter != shared_modules.end();
165 shared_modules_iter++) { 165 shared_modules_iter++) {
166 if (used_shared_modules.count(*shared_modules_iter)) 166 if (used_shared_modules.count(*shared_modules_iter))
167 continue; 167 continue;
168 service->UninstallExtension( 168 service->UninstallExtension(
169 *shared_modules_iter, 169 *shared_modules_iter,
170 extensions::UNINSTALL_REASON_ORPHANED_SHARED_MODULE, 170 extensions::UNINSTALL_REASON_ORPHANED_SHARED_MODULE,
171 base::Bind(&base::DoNothing),
171 NULL); // Ignore error. 172 NULL); // Ignore error.
172 } 173 }
173 } 174 }
174 175
175 void SharedModuleService::OnExtensionInstalled( 176 void SharedModuleService::OnExtensionInstalled(
176 content::BrowserContext* browser_context, 177 content::BrowserContext* browser_context,
177 const Extension* extension, 178 const Extension* extension,
178 bool is_update) { 179 bool is_update) {
179 if (is_update) 180 if (is_update)
180 PruneSharedModules(); 181 PruneSharedModules();
181 } 182 }
182 183
183 void SharedModuleService::OnExtensionUninstalled( 184 void SharedModuleService::OnExtensionUninstalled(
184 content::BrowserContext* browser_context, 185 content::BrowserContext* browser_context,
185 const Extension* extension, 186 const Extension* extension,
186 extensions::UninstallReason reason) { 187 extensions::UninstallReason reason) {
187 PruneSharedModules(); 188 PruneSharedModules();
188 } 189 }
189 190
190 } // namespace extensions 191 } // 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