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

Side by Side Diff: components/offline_pages/core/prefetch/prefetch_service_impl.h

Issue 2864293003: [Offline Pages] Add a GCMAppHandler for offline page prefetch. (Closed)
Patch Set: Fix windows Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_IMPL_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_IMPL_H_
6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_IMPL_H_ 6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/offline_pages/core/prefetch/prefetch_gcm_handler.h"
11 #include "components/offline_pages/core/prefetch/prefetch_service.h" 12 #include "components/offline_pages/core/prefetch/prefetch_service.h"
13 #include "components/offline_pages/core/prefetch/suggested_articles_observer.h"
14
15 namespace ntp_snippets {
16 class ContentSuggestionsService;
17 }
12 18
13 namespace offline_pages { 19 namespace offline_pages {
14 20
15 class PrefetchServiceImpl : public PrefetchService { 21 class PrefetchServiceImpl : public PrefetchService {
16 public: 22 public:
17 PrefetchServiceImpl(); 23 PrefetchServiceImpl(std::unique_ptr<PrefetchGCMHandler> gcm_handler);
18 ~PrefetchServiceImpl() override; 24 ~PrefetchServiceImpl() override;
19 25
20 // PrefetchService implementation: 26 // PrefetchService implementation:
27 void ObserveContentSuggestionsService(
28 ntp_snippets::ContentSuggestionsService* service) override;
21 PrefetchDispatcher* GetDispatcher() override; 29 PrefetchDispatcher* GetDispatcher() override;
30 PrefetchGCMHandler* GetPrefetchGCMHandler() override;
22 31
23 // KeyedService implementation: 32 // KeyedService implementation:
24 void Shutdown() override; 33 void Shutdown() override;
25 34
26 private: 35 private:
36 std::unique_ptr<SuggestedArticlesObserver> suggested_articles_observer_;
37 std::unique_ptr<PrefetchGCMHandler> gcm_handler_;
27 std::unique_ptr<PrefetchDispatcher> dispatcher_; 38 std::unique_ptr<PrefetchDispatcher> dispatcher_;
28 39
29 DISALLOW_COPY_AND_ASSIGN(PrefetchServiceImpl); 40 DISALLOW_COPY_AND_ASSIGN(PrefetchServiceImpl);
30 }; 41 };
31 42
32 } // namespace offline_pages 43 } // namespace offline_pages
33 44
34 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_IMPL_H_ 45 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698