[Extensions][Task Scheduler] Remove ExtensionService::GetFileTaskRunner
ExtensionService::GetFileTaskRunner() now just forwards to returning
extensions::GetExtensionFileTaskRunner() (the devoted sequenced task
runner for extension-related file tasks). Update callers to just use
this instead to avoid confusion and simplify the code, as well as
remove unneeded dependencies on ExtensionService.
Bug: 750122
Change-Id: Ic0d6a6ddc087d211d7c9290287e2698b7898ea4a
Reviewed-on: https://chromium-review.googlesource.com/598946
Reviewed-by: Evan Stade <[email protected]>
Reviewed-by: Istiaque Ahmed <[email protected]>
Reviewed-by: Toni Barzic <[email protected]>
Commit-Queue: Devlin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#493218}
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 95ca0f3..f46cbae 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -563,7 +563,7 @@
// Delete extension_path since we're not creating a CrxInstaller
// that would do it for us.
if (file_ownership_passed &&
- !GetFileTaskRunner()->PostTask(
+ !extensions::GetExtensionFileTaskRunner()->PostTask(
FROM_HERE, base::BindOnce(&extensions::file_util::DeleteFile,
file.path, false)))
NOTREACHED();
@@ -821,7 +821,7 @@
// Tell the backend to start deleting installed extensions on the file thread.
if (!Manifest::IsUnpackedLocation(extension->location())) {
- if (!GetFileTaskRunner()->PostTask(
+ if (!extensions::GetExtensionFileTaskRunner()->PostTask(
FROM_HERE,
base::BindOnce(&ExtensionService::UninstallExtensionOnFileThread,
extension->id(), profile_, install_directory_,
@@ -1772,7 +1772,7 @@
// Delete the extension directory since we're not going to
// load it.
- if (!GetFileTaskRunner()->PostTask(
+ if (!extensions::GetExtensionFileTaskRunner()->PostTask(
FROM_HERE, base::BindOnce(&extensions::file_util::DeleteFile,
extension->path(), true))) {
NOTREACHED();
@@ -2508,12 +2508,6 @@
}
}
-base::SequencedTaskRunner* ExtensionService::GetFileTaskRunner() {
- // TODO(devlin): Update callers to use GetExtensionFileTaskRunner()
- // directly.
- return extensions::GetExtensionFileTaskRunner().get();
-}
-
// Used only by test code.
void ExtensionService::UnloadAllExtensionsInternal() {
profile_->GetExtensionSpecialStoragePolicy()->RevokeRightsForAllExtensions();