summaryrefslogtreecommitdiffstats
path: root/components/component_updater/component_updater_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'components/component_updater/component_updater_service.h')
-rw-r--r--components/component_updater/component_updater_service.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/components/component_updater/component_updater_service.h b/components/component_updater/component_updater_service.h
index ac60a7f..450508a 100644
--- a/components/component_updater/component_updater_service.h
+++ b/components/component_updater/component_updater_service.h
@@ -6,12 +6,14 @@
#define COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_
#include <stdint.h>
+
#include <string>
#include <vector>
#include "base/callback_forward.h"
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/version.h"
#include "url/gurl.h"
@@ -61,14 +63,14 @@ class OnDemandUpdater;
// All methods are safe to call ONLY from the browser's main thread.
class ComponentUpdateService {
public:
- enum Status { kOk, kReplaced, kInProgress, kError };
+ enum class Status { kOk, kReplaced, kInProgress, kError };
// Defines an interface to observe ComponentUpdateService. It provides
// notifications when state changes occur for the service or for the
// registered components.
class Observer {
public:
- enum Events {
+ enum class Events {
// Sent when the component updater starts doing update checks.
COMPONENT_UPDATER_STARTED,
@@ -169,7 +171,7 @@ class ComponentUpdateService {
friend class ::ComponentsUI;
};
-typedef ComponentUpdateService::Observer ServiceObserver;
+using ServiceObserver = ComponentUpdateService::Observer;
class OnDemandUpdater {
public:
@@ -190,10 +192,9 @@ class OnDemandUpdater {
const std::string& component_id) = 0;
};
-// Creates the component updater. You must pass a valid |config| allocated on
-// the heap which the component updater will own.
-ComponentUpdateService* ComponentUpdateServiceFactory(
- update_client::Configurator* config);
+// Creates the component updater.
+scoped_ptr<ComponentUpdateService> ComponentUpdateServiceFactory(
+ const scoped_refptr<update_client::Configurator>& config);
} // namespace component_updater