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

Unified Diff: components/doodle/doodle_service.h

Issue 2752563003: [Doodle] Make DoodleService a KeyedService and add a factory (Closed)
Patch Set: Move factory to c/b/doodle Created 3 years, 9 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
« no previous file with comments | « components/doodle/DEPS ('k') | components/doodle/doodle_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/doodle/doodle_service.h
diff --git a/components/doodle/doodle_service.h b/components/doodle/doodle_service.h
index 85c5cec35b27707fa00ea0cc1caba5c921261826..3b519f8d06ede7eadd328a4e6fcdd6b6427ab955 100644
--- a/components/doodle/doodle_service.h
+++ b/components/doodle/doodle_service.h
@@ -14,6 +14,7 @@
#include "base/timer/timer.h"
#include "components/doodle/doodle_fetcher.h"
#include "components/doodle/doodle_types.h"
+#include "components/keyed_service/core/keyed_service.h"
class PrefRegistrySimple;
class PrefService;
@@ -24,7 +25,7 @@ class TimeDelta;
namespace doodle {
-class DoodleService {
+class DoodleService : public KeyedService {
public:
class Observer {
public:
@@ -38,7 +39,10 @@ class DoodleService {
std::unique_ptr<DoodleFetcher> fetcher,
std::unique_ptr<base::OneShotTimer> expiry_timer,
std::unique_ptr<base::Clock> clock);
- ~DoodleService();
+ ~DoodleService() override;
+
+ // KeyedService implementation.
+ void Shutdown() override;
// Returns the current (cached) config, if any.
const base::Optional<DoodleConfig>& config() const { return cached_config_; }
« no previous file with comments | « components/doodle/DEPS ('k') | components/doodle/doodle_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698