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

Unified Diff: components/offline_pages/background/request_coordinator.cc

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: Attempt gypi file fix. Created 4 years, 7 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/request_coordinator.cc
diff --git a/components/offline_pages/background/request_coordinator.cc b/components/offline_pages/background/request_coordinator.cc
index 325577b49b360051bebd7cc7c5157369e02cb229..ae5a3a2e15d5115e0543581c4879c1db2bd3ef9c 100644
--- a/components/offline_pages/background/request_coordinator.cc
+++ b/components/offline_pages/background/request_coordinator.cc
@@ -4,18 +4,24 @@
#include "components/offline_pages/background/request_coordinator.h"
+#include <utility>
+
+#include "components/offline_pages/background/offliner_factory.h"
+#include "components/offline_pages/background/offliner_policy.h"
#include "components/offline_pages/background/save_page_request.h"
namespace offline_pages {
-// TODO(dougarnett): How to inject Offliner factories and policy objects.
-RequestCoordinator::RequestCoordinator() {
+RequestCoordinator::RequestCoordinator(
+ std::unique_ptr<OfflinerPolicy> policy,
+ std::unique_ptr<OfflinerFactory> factory) {
// Do setup as needed.
+ // TODO(petewil): Assert policy not null.
+ policy_ = std::move(policy);
+ factory_ = std::move(factory);
}
-RequestCoordinator::~RequestCoordinator() {
- // Do cleanup as needed.
-}
+RequestCoordinator::~RequestCoordinator() {}
bool RequestCoordinator::SavePageLater(const SavePageRequest& request) {
return true;

Powered by Google App Engine
This is Rietveld 408576698