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

Unified Diff: chrome/browser/extensions/extension_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, 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 172fa6e11a2f843b9eb3bc5464f27e1bde3595be..8884c2d6a50de3226e19f665ebfb00f5251c994a 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -141,8 +141,10 @@ void ExtensionService::CheckExternalUninstall(const std::string& id) {
<< "with id: " << id;
return;
}
- UninstallExtension(
- id, extensions::UNINSTALL_REASON_ORPHANED_EXTERNAL_EXTENSION, NULL);
+ UninstallExtension(id,
+ extensions::UNINSTALL_REASON_ORPHANED_EXTERNAL_EXTENSION,
+ base::Bind(&base::DoNothing),
+ NULL);
}
void ExtensionService::SetFileTaskRunnerForTesting(
@@ -222,7 +224,8 @@ bool ExtensionService::UninstallExtensionHelper(
// The following call to UninstallExtension will not allow an uninstall of a
// policy-controlled extension.
base::string16 error;
- if (!extensions_service->UninstallExtension(extension_id, reason, &error)) {
+ if (!extensions_service->UninstallExtension(
+ extension_id, reason, base::Bind(&base::DoNothing), &error)) {
LOG(WARNING) << "Cannot uninstall extension with id " << extension_id
<< ": " << error;
return false;
@@ -675,6 +678,7 @@ bool ExtensionService::UninstallExtension(
// to become invalid. Instead, use |extenson->id()|.
const std::string& transient_extension_id,
extensions::UninstallReason reason,
+ const base::Closure& deletion_done_callback,
base::string16* error) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -738,7 +742,8 @@ bool ExtensionService::UninstallExtension(
NOTREACHED();
}
- extensions::DataDeleter::StartDeleting(profile_, extension.get());
+ extensions::DataDeleter::StartDeleting(
+ profile_, extension.get(), deletion_done_callback);
UntrackTerminatedExtension(extension->id());
« no previous file with comments | « chrome/browser/extensions/extension_service.h ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698