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

Unified Diff: components/offline_pages/offline_page_model_impl.h

Issue 2322833002: Support serving offline page by offline ID (Closed)
Patch Set: Created 4 years, 3 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: components/offline_pages/offline_page_model_impl.h
diff --git a/components/offline_pages/offline_page_model_impl.h b/components/offline_pages/offline_page_model_impl.h
index 9cdd627467b8af367d024a53f9a1a2eae13da92d..05f3660a01bf5d2bd31ee7fa1d955be4d435257e 100644
--- a/components/offline_pages/offline_page_model_impl.h
+++ b/components/offline_pages/offline_page_model_impl.h
@@ -34,6 +34,7 @@
class GURL;
namespace base {
+class Clock;
class SequencedTaskRunner;
class Time;
class TimeDelta;
@@ -114,6 +115,7 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService {
// Methods for testing only:
OfflinePageMetadataStore* GetStoreForTesting();
+ void SetClockForTesting(std::unique_ptr<base::Clock> clock);
OfflinePageStorageManager* GetStorageManager();
@@ -300,6 +302,9 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService {
// Logger to facilitate recording of events.
OfflinePageModelEventLogger offline_event_logger_;
+ // Clock for getting time.
+ std::unique_ptr<base::Clock> clock_;
+
base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl);

Powered by Google App Engine
This is Rietveld 408576698