Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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_BACKGROUND_PRERENDERER_OFFLINER_H_ | |
| 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_PRERENDERER_OFFLINER_H_ | |
| 7 | |
| 8 #include "components/offline_pages/background/offliner.h" | |
| 9 | |
| 10 namespace offline_pages { | |
| 11 | |
| 12 class SavePageRequest; | |
| 13 class OfflinerPolicy; | |
| 14 | |
| 15 // Interface of a class responsible for constructing an offline page given | |
| 16 // a request with a URL. | |
| 17 class PrerendererOffliner : public Offliner { | |
|
fgorski
2016/04/29 04:16:46
I don't think you need this file. And it is not in
Pete Williamson
2016/05/02 20:51:14
Right. I started this before Doug posted that cha
| |
| 18 public: | |
| 19 PrerendererOffliner(OfflinerPolicy* policy); | |
| 20 ~PrerendererOffliner() override; | |
| 21 | |
| 22 // Processes |request| to load and save an offline page. | |
| 23 // Returns whether the request was accepted or not. | |
| 24 bool LoadAndSave( | |
| 25 const SavePageRequest& request, | |
| 26 const CompletionCallback& callback) final; | |
| 27 | |
| 28 // Clears the currently processing request, if any. | |
| 29 void Cancel() override; | |
| 30 | |
| 31 private: | |
| 32 // This is owned by the request coordinator class, and should not be deleted | |
| 33 // when the offliner is deleted. | |
| 34 OfflinerPolicy* policy_; | |
| 35 }; | |
| 36 | |
| 37 } // namespace offline_pages | |
| 38 | |
| 39 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_PRERENDERER_OFFLINER_H_ | |
| OLD | NEW |