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

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

Issue 2811813002: [Offline Pages] Set up the initial prefetching service. (Closed)
Patch Set: Remove offline page model. Created 3 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_H_
6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_H_
7
8 #include "components/keyed_service/core/keyed_service.h"
9
10 class GURL;
11
12 namespace offline_pages {
13
14 // Main class for the Offline Pages Prefetching feature, which will ask a server
15 // to package content from interesting URLs and send it to Chrome for
16 // consumption while offline.
17 class PrefetchService : public KeyedService {
Dmitry Titov 2017/04/11 21:50:46 As formulated, the service may only have a single
dewittj 2017/04/12 00:22:48 Done.
18 public:
19 ~PrefetchService() override = default;
20
21 // Called when a consumer has new URLs for the system to prefetch. Currently
22 // the only consumer is article suggestions.
Dmitry Titov 2017/04/11 21:50:46 can we just remove use of 'suggestions' and just u
dewittj 2017/04/12 00:22:48 Done.
23 virtual void OnNewURLsToPrefetch(std::vector<GURL> suggested_urls) = 0;
jianli 2017/04/11 22:39:55 nit: Please add const &.
dewittj 2017/04/12 00:22:48 Done.
24
25 // Called when all existing suggestions are no longer considered valid. The
26 // prefetch service should remove any suggestions that have not yet started
27 // downloading.
28 virtual void RemoveAllUnprocessedURLsToPrefetch() = 0;
jianli 2017/04/11 22:39:55 Since class name is PrefetchService, we can probab
dewittj 2017/04/12 00:22:49 I updated it to refer to the PrefetchURL struct in
29 };
30
31 } // namespace offline_pages
32
33 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698