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

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: Remove extraneous includes 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..7eba71ccf7e21e1fcc595fe2f89b187f538e14c5 100644
--- a/chrome/browser/component_updater/default_component_installer.h
+++ b/chrome/browser/component_updater/default_component_installer.h
@@ -9,13 +9,17 @@
#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;
+class SingleThreadTaskRunner;
} // namespace base
namespace component_updater {
@@ -76,7 +80,7 @@ class ComponentInstallerTraits {
// to the constructor.
class DefaultComponentInstaller : public ComponentInstaller {
public:
- explicit DefaultComponentInstaller(
+ DefaultComponentInstaller(
scoped_ptr<ComponentInstallerTraits> installer_traits);
// Registers the component for update checks and installs.
@@ -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::SingleThreadTaskRunner> main_task_runner_;
+
+ base::ThreadChecker thread_checker_;
DISALLOW_COPY_AND_ASSIGN(DefaultComponentInstaller);
};
« no previous file with comments | « chrome/browser/component_updater/crx_downloader.cc ('k') | chrome/browser/component_updater/default_component_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698