Index: components/offline_pages/background/prerenderer_offliner.h |
diff --git a/components/offline_pages/background/prerenderer_offliner.h b/components/offline_pages/background/prerenderer_offliner.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..df2a2aaa860eb8320b3cee0a50429aae332440d5 |
--- /dev/null |
+++ b/components/offline_pages/background/prerenderer_offliner.h |
@@ -0,0 +1,39 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_PRERENDERER_OFFLINER_H_ |
+#define COMPONENTS_OFFLINE_PAGES_BACKGROUND_PRERENDERER_OFFLINER_H_ |
+ |
+#include "components/offline_pages/background/offliner.h" |
+ |
+namespace offline_pages { |
+ |
+class SavePageRequest; |
+class OfflinerPolicy; |
+ |
+// Interface of a class responsible for constructing an offline page given |
+// a request with a URL. |
+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
|
+ public: |
+ PrerendererOffliner(OfflinerPolicy* policy); |
+ ~PrerendererOffliner() override; |
+ |
+ // Processes |request| to load and save an offline page. |
+ // Returns whether the request was accepted or not. |
+ bool LoadAndSave( |
+ const SavePageRequest& request, |
+ const CompletionCallback& callback) final; |
+ |
+ // Clears the currently processing request, if any. |
+ void Cancel() override; |
+ |
+ private: |
+ // This is owned by the request coordinator class, and should not be deleted |
+ // when the offliner is deleted. |
+ OfflinerPolicy* policy_; |
+}; |
+ |
+} // namespace offline_pages |
+ |
+#endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_PRERENDERER_OFFLINER_H_ |