Chromium Code Reviews| Index: components/suggestions/suggestions_store.h |
| diff --git a/components/suggestions/suggestions_store.h b/components/suggestions/suggestions_store.h |
| index 78ff7f6b17cb900816060ed5f2dbcb3ce3bdf0da..5f0e666264bc899a8a9d06210cee9974913eceda 100644 |
| --- a/components/suggestions/suggestions_store.h |
| +++ b/components/suggestions/suggestions_store.h |
| @@ -6,6 +6,8 @@ |
| #define COMPONENTS_SUGGESTIONS_SUGGESTIONS_STORE_H_ |
| #include "base/macros.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "base/time/clock.h" |
| #include "components/suggestions/proto/suggestions.pb.h" |
| class PrefService; |
| @@ -39,13 +41,18 @@ class SuggestionsStore { |
| // Register SuggestionsStore related prefs in the Profile prefs. |
| static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| + // Gains ownership of |clock|. |
|
Matt Giuca
2014/12/18 22:51:13
Nit: This comment is not necessary (the ownership
gayane -on leave until 09-2017
2014/12/22 16:29:38
Done.
|
| + void SetClockForTesting(scoped_ptr<base::Clock> clock); |
| + |
| protected: |
| // Test seam. For simplicity of mock creation. |
| - SuggestionsStore() {} |
| + SuggestionsStore(); |
| private: |
| // The pref service used to persist the suggestions data. |
| PrefService* pref_service_; |
| + // Can be set for testing. |
| + scoped_ptr<base::Clock> clock_; |
| DISALLOW_COPY_AND_ASSIGN(SuggestionsStore); |