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

Unified Diff: components/offline_pages/background/prerenderer_offliner.h

Issue 1929223002: Add skeletons for the factories to create the request coordinator and (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Manual merge of changes in the base changelist. Created 4 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698