| Index: components/doodle/doodle_service.h
|
| diff --git a/components/doodle/doodle_service.h b/components/doodle/doodle_service.h
|
| index 3b519f8d06ede7eadd328a4e6fcdd6b6427ab955..db8487052065f853addcfbee5f3601f640073636 100644
|
| --- a/components/doodle/doodle_service.h
|
| +++ b/components/doodle/doodle_service.h
|
| @@ -11,6 +11,7 @@
|
| #include "base/observer_list.h"
|
| #include "base/optional.h"
|
| #include "base/time/clock.h"
|
| +#include "base/time/tick_clock.h"
|
| #include "base/timer/timer.h"
|
| #include "components/doodle/doodle_fetcher.h"
|
| #include "components/doodle/doodle_types.h"
|
| @@ -38,7 +39,8 @@ class DoodleService : public KeyedService {
|
| DoodleService(PrefService* pref_service,
|
| std::unique_ptr<DoodleFetcher> fetcher,
|
| std::unique_ptr<base::OneShotTimer> expiry_timer,
|
| - std::unique_ptr<base::Clock> clock);
|
| + std::unique_ptr<base::Clock> clock,
|
| + std::unique_ptr<base::TickClock> tick_clock);
|
| ~DoodleService() override;
|
|
|
| // KeyedService implementation.
|
| @@ -62,11 +64,14 @@ class DoodleService : public KeyedService {
|
|
|
| private:
|
| // Callback for the fetcher.
|
| - void DoodleFetched(DoodleState state,
|
| + void DoodleFetched(base::TimeTicks start_time,
|
| + DoodleState state,
|
| base::TimeDelta time_to_live,
|
| const base::Optional<DoodleConfig>& doodle_config);
|
|
|
| - void UpdateCachedConfig(base::TimeDelta time_to_live,
|
| + void UpdateCachedConfig(base::Optional<base::TimeDelta> download_time,
|
| + DoodleState state,
|
| + base::TimeDelta time_to_live,
|
| const base::Optional<DoodleConfig>& doodle_config);
|
|
|
| // Callback for the expiry timer.
|
| @@ -79,6 +84,7 @@ class DoodleService : public KeyedService {
|
|
|
| std::unique_ptr<base::OneShotTimer> expiry_timer_;
|
| std::unique_ptr<base::Clock> clock_;
|
| + std::unique_ptr<base::TickClock> tick_clock_;
|
|
|
| // The result of the last network fetch.
|
| base::Optional<DoodleConfig> cached_config_;
|
|
|