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

Unified Diff: chrome/browser/ui/webui/help/version_updater_win.cc

Issue 2207523002: Move on-demand update checks from the FILE thread to the blocking pool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@threadfix
Patch Set: pk review Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/help/version_updater_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/help/version_updater_win.cc
diff --git a/chrome/browser/ui/webui/help/version_updater_win.cc b/chrome/browser/ui/webui/help/version_updater_win.cc
index e0eb626dc437512ab61e19ceeaa435f2aabc6e8c..2613161e6f492e620f004f6243ffbf00ce296463 100644
--- a/chrome/browser/ui/webui/help/version_updater_win.cc
+++ b/chrome/browser/ui/webui/help/version_updater_win.cc
@@ -39,7 +39,7 @@ void VersionUpdaterWin::CheckForUpdate(const StatusCallback& callback,
(base::win::OSInfo::GetInstance()->service_pack().major == 0) &&
!base::win::UserAccountControlIsEnabled())) {
callback_.Run(CHECKING, 0, base::string16());
- BeginUpdateCheckOnFileThread(false /* !install_update_if_possible */);
+ BeginUpdateCheckInBlockingPool(false /* !install_update_if_possible */);
}
}
@@ -66,7 +66,7 @@ void VersionUpdaterWin::OnUpdateCheckComplete(
} else {
// Notify the caller that the update is now beginning and initiate it.
status = UPDATING;
- BeginUpdateCheckOnFileThread(true /* install_update_if_possible */);
+ BeginUpdateCheckInBlockingPool(true /* install_update_if_possible */);
}
callback_.Run(status, 0, base::string16());
}
@@ -113,10 +113,13 @@ void VersionUpdaterWin::OnError(GoogleUpdateErrorCode error_code,
callback_.Run(status, 0, message);
}
-void VersionUpdaterWin::BeginUpdateCheckOnFileThread(
+void VersionUpdaterWin::BeginUpdateCheckInBlockingPool(
bool install_update_if_possible) {
- BeginUpdateCheck(content::BrowserThread::GetTaskRunnerForThread(
- content::BrowserThread::FILE),
+ base::SequencedWorkerPool* blocking_pool =
+ content::BrowserThread::GetBlockingPool();
+ BeginUpdateCheck(blocking_pool->GetSequencedTaskRunnerWithShutdownBehavior(
+ blocking_pool->GetSequenceToken(),
+ base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN),
g_browser_process->GetApplicationLocale(),
install_update_if_possible, owner_widget_,
weak_factory_.GetWeakPtr());
« no previous file with comments | « chrome/browser/ui/webui/help/version_updater_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698