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

Unified Diff: chrome/browser/component_updater/default_component_installer.h

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/default_component_installer.h
diff --git a/chrome/browser/component_updater/default_component_installer.h b/chrome/browser/component_updater/default_component_installer.h
index 12394feca5de598473380f45c337fc0460387d6c..55a12c365ed5148eb533f240ee8e963721607905 100644
--- a/chrome/browser/component_updater/default_component_installer.h
+++ b/chrome/browser/component_updater/default_component_installer.h
@@ -9,13 +9,16 @@
#include <vector>
#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/threading/thread_checker.h"
#include "base/version.h"
#include "chrome/browser/component_updater/component_updater_service.h"
namespace base {
class DictionaryValue;
class FilePath;
+class SequencedTaskRunner;
} // namespace base
namespace component_updater {
@@ -76,8 +79,9 @@ class ComponentInstallerTraits {
// to the constructor.
class DefaultComponentInstaller : public ComponentInstaller {
public:
- explicit DefaultComponentInstaller(
- scoped_ptr<ComponentInstallerTraits> installer_traits);
+ DefaultComponentInstaller(
+ scoped_ptr<ComponentInstallerTraits> installer_traits,
+ scoped_refptr<base::SequencedTaskRunner> task_runner);
// Registers the component for update checks and installs.
void Register(ComponentUpdateService* cus);
@@ -103,6 +107,13 @@ class DefaultComponentInstaller : public ComponentInstaller {
std::string current_fingerprint_;
scoped_ptr<base::DictionaryValue> current_manifest_;
scoped_ptr<ComponentInstallerTraits> installer_traits_;
+ scoped_refptr<base::SequencedTaskRunner> task_runner_;
+
+ // Used to post responses back to the main thread. Initialized on the main
+ // loop but accessed from the task runner.
+ scoped_refptr<base::MessageLoopProxy> main_loop_;
blundell 2014/07/15 08:45:20 Same comment re: MessageLoopProxy.
tommycli 2014/07/15 18:58:26 Done.
+
+ base::ThreadChecker thread_checker_;
DISALLOW_COPY_AND_ASSIGN(DefaultComponentInstaller);
};

Powered by Google App Engine
This is Rietveld 408576698