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

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

Issue 2140093002: STH Set: Delay loading until after start-up. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/component_updater/sth_set_component_installer.cc
diff --git a/chrome/browser/component_updater/sth_set_component_installer.cc b/chrome/browser/component_updater/sth_set_component_installer.cc
index b6ced0134ef16a261d8719e72d851bbaeb5ac705..489321d9a95340a925209d87672be22e4eaf3604 100644
--- a/chrome/browser/component_updater/sth_set_component_installer.cc
+++ b/chrome/browser/component_updater/sth_set_component_installer.cc
@@ -74,13 +74,10 @@ void STHSetComponentInstallerTraits::ComponentReady(
const base::Version& version,
const base::FilePath& install_dir,
std::unique_ptr<base::DictionaryValue> manifest) {
- if (!content::BrowserThread::PostBlockingPoolTask(
- FROM_HERE,
- base::Bind(&STHSetComponentInstallerTraits::LoadSTHsFromDisk,
- base::Unretained(this), GetInstalledPath(install_dir),
- version))) {
- NOTREACHED();
- }
+ content::BrowserThread::PostAfterStartupTask(
Alexei Svitkine (slow) 2016/07/12 14:56:09 Per comment on the bug, please keep the old behavi
Eran Messeri 2016/07/12 16:14:42 Done.
+ FROM_HERE, content::BrowserThread::GetBlockingPool(),
+ base::Bind(&STHSetComponentInstallerTraits::PostStartupLoadSTHsFromDisk,
waffles 2016/07/12 13:56:59 Why not directly post LoadSTHsFromDisk? (I'm not s
Eran Messeri 2016/07/12 16:14:42 No reason really, removed.
+ base::Unretained(this), install_dir, version));
}
// Called during startup and installation before ComponentReady().
@@ -107,6 +104,18 @@ STHSetComponentInstallerTraits::GetInstallerAttributes() const {
return update_client::InstallerAttributes();
}
+void STHSetComponentInstallerTraits::PostStartupLoadSTHsFromDisk(
+ const base::FilePath& install_dir,
+ const base::Version& version) {
+ if (!content::BrowserThread::PostBlockingPoolTask(
+ FROM_HERE,
+ base::Bind(&STHSetComponentInstallerTraits::LoadSTHsFromDisk,
+ base::Unretained(this), GetInstalledPath(install_dir),
+ version))) {
+ NOTREACHED();
+ }
+}
+
void STHSetComponentInstallerTraits::LoadSTHsFromDisk(
const base::FilePath& sths_path,
const base::Version& version) {
« no previous file with comments | « chrome/browser/component_updater/sth_set_component_installer.h ('k') | content/public/browser/browser_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698