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

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

Issue 385013002: Componentize component_updater: Replace content::BrowserThread usage with task runners (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/component_updater/cld_component_installer.cc
diff --git a/chrome/browser/component_updater/cld_component_installer.cc b/chrome/browser/component_updater/cld_component_installer.cc
index d63b2da645bc18314c26083c43688c74abbfe57a..c27fd5adfe0f841bf2e387415a1eaecbf9bcd8e5 100644
--- a/chrome/browser/component_updater/cld_component_installer.cc
+++ b/chrome/browser/component_updater/cld_component_installer.cc
@@ -13,14 +13,13 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/path_service.h"
-#include "chrome/browser/profiles/profile.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "components/component_updater/component_updater_paths.h"
#include "components/translate/content/browser/data_file_browser_cld_data_provider.h"
#include "content/public/browser/browser_thread.h"
#include "net/ssl/ssl_config_service.h"
using component_updater::ComponentUpdateService;
-using content::BrowserThread;
namespace {
// TODO(andrewhayden): Make the data file path into a gyp/gn define
@@ -106,8 +105,12 @@ void RegisterCldComponent(ComponentUpdateService* cus) {
scoped_ptr<ComponentInstallerTraits> traits(
new CldComponentInstallerTraits());
// |cus| will take ownership of |installer| during installer->Register(cus).
- DefaultComponentInstaller* installer =
- new DefaultComponentInstaller(traits.Pass());
+ DefaultComponentInstaller* installer = new DefaultComponentInstaller(
+ traits.Pass(),
+ content::BrowserThread::GetBlockingPool()
+ ->GetSequencedTaskRunnerWithShutdownBehavior(
+ content::BrowserThread::GetBlockingPool()->GetSequenceToken(),
blundell 2014/07/15 08:45:20 What logic is behind the choices on lines 112 and
tommycli 2014/07/15 18:58:25 I replicated the choices made here: https://code
+ base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
installer->Register(cus);
}

Powered by Google App Engine
This is Rietveld 408576698