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

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

Issue 2879013002: Create skeleton for the Prefetching store and initial pipeline step. (Closed)
Patch Set: Made construction params a cost&. 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_DISPATCHER_IMPL_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_DISPATCHER_IMPL_H_
6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_DISPATCHER_IMPL_H_ 6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_DISPATCHER_IMPL_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "components/offline_pages/core/prefetch/prefetch_dispatcher.h" 11 #include "components/offline_pages/core/prefetch/prefetch_dispatcher.h"
12 #include "components/offline_pages/core/task_queue.h"
10 13
11 namespace offline_pages { 14 namespace offline_pages {
15 class PrefetchService;
12 16
13 class PrefetchDispatcherImpl : public PrefetchDispatcher { 17 class PrefetchDispatcherImpl : public PrefetchDispatcher {
14 public: 18 public:
15 PrefetchDispatcherImpl(); 19 PrefetchDispatcherImpl();
16 ~PrefetchDispatcherImpl() override; 20 ~PrefetchDispatcherImpl() override;
17 21
18 // PrefetchDispatcher implementation: 22 // PrefetchDispatcher implementation:
23 void SetService(PrefetchService* service) override;
19 void AddCandidatePrefetchURLs( 24 void AddCandidatePrefetchURLs(
20 const std::vector<PrefetchURL>& suggested_urls) override; 25 const std::vector<PrefetchURL>& prefetch_urls) override;
21 void RemoveAllUnprocessedPrefetchURLs(const std::string& name_space) override; 26 void RemoveAllUnprocessedPrefetchURLs(const std::string& name_space) override;
22 void RemovePrefetchURLsByClientId(const ClientId& client_id) override; 27 void RemovePrefetchURLsByClientId(const ClientId& client_id) override;
23 void BeginBackgroundTask(std::unique_ptr<ScopedBackgroundTask> task) override; 28 void BeginBackgroundTask(std::unique_ptr<ScopedBackgroundTask> task) override;
24 void StopBackgroundTask(ScopedBackgroundTask* task) override; 29 void StopBackgroundTask(ScopedBackgroundTask* task) override;
25 30
26 private: 31 private:
32 friend class PrefetchDispatcherTest;
33
34 PrefetchService* service_;
35 TaskQueue task_queue_;
36
27 DISALLOW_COPY_AND_ASSIGN(PrefetchDispatcherImpl); 37 DISALLOW_COPY_AND_ASSIGN(PrefetchDispatcherImpl);
28 }; 38 };
29 39
30 } // namespace offline_pages 40 } // namespace offline_pages
31 41
32 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_DISPATCHER_IMPL_H_ 42 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_DISPATCHER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698