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

Unified Diff: chrome/browser/component_updater/recovery_component_installer.cc

Issue 2591903004: Update TaskTraits in recovery_component_installer.cc. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/recovery_component_installer.cc
diff --git a/chrome/browser/component_updater/recovery_component_installer.cc b/chrome/browser/component_updater/recovery_component_installer.cc
index 9c6d799d2fab5e9b70904d742fdd0fc14ba69d71..30f61b2958458f0b3c5693a4d8b45d1b8bbe991c 100644
--- a/chrome/browser/component_updater/recovery_component_installer.cc
+++ b/chrome/browser/component_updater/recovery_component_installer.cc
@@ -224,12 +224,13 @@ void DoElevatedInstallRecoveryComponent(const base::FilePath& path) {
}
base::Process process = base::Process::Open(pid);
#endif
+ // This task joins a process, hence .WithSyncPrimitives().
base::PostTaskWithTraits(
FROM_HERE, base::TaskTraits()
.WithShutdownBehavior(
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
.WithPriority(base::TaskPriority::BACKGROUND)
- .WithWait(),
+ .WithSyncPrimitives(),
base::Bind(&WaitForElevatedInstallToComplete, base::Passed(&process)));
}
@@ -239,7 +240,7 @@ void ElevatedInstallRecoveryComponent(const base::FilePath& installer_path) {
.WithShutdownBehavior(
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
.WithPriority(base::TaskPriority::BACKGROUND)
- .WithFileIO(),
+ .MayBlock(),
base::Bind(&DoElevatedInstallRecoveryComponent, installer_path));
}
#endif // defined(OS_WIN)
@@ -371,12 +372,13 @@ bool RecoveryComponentInstaller::RunInstallCommand(
return false;
// Let worker pool thread wait for us so we don't block Chrome shutdown.
+ // This task joins a process, hence .WithSyncPrimitives().
base::PostTaskWithTraits(
FROM_HERE, base::TaskTraits()
.WithShutdownBehavior(
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
.WithPriority(base::TaskPriority::BACKGROUND)
- .WithWait(),
+ .WithSyncPrimitives(),
base::Bind(&WaitForInstallToComplete, base::Passed(&process),
installer_folder, prefs_));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698