| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/offline_pages/background/request_coordinator.h" | 5 #include "components/offline_pages/background/request_coordinator.h" |
| 6 | 6 |
| 7 // TODO(fgorski): include file with SavePageRequest definition. | 7 // TODO(fgorski): include file with SavePageRequest definition. |
| 8 #include "components/offline_pages/background/offliner_policy.h" |
| 9 #include "components/offline_pages/background/scheduler.h" |
| 8 | 10 |
| 9 namespace offline_pages { | 11 namespace offline_pages { |
| 10 | 12 |
| 11 // TODO(dougarnett): How to inject Offliner factories and policy objects. | 13 RequestCoordinator::RequestCoordinator( |
| 12 RequestCoordinator::RequestCoordinator() { | 14 OfflinerPolicy* policy, OfflinerFactory* factory) { |
| 13 // Do setup as needed. | 15 // Do setup as needed. |
| 16 // TODO(petewil): Assert policy not null. |
| 17 policy_ = policy; |
| 18 factory_ = factory; |
| 14 } | 19 } |
| 15 | 20 |
| 16 RequestCoordinator::~RequestCoordinator() { | 21 RequestCoordinator::~RequestCoordinator() { |
| 17 // Do cleanup as needed. | 22 delete policy_; |
| 18 } | 23 } |
| 19 | 24 |
| 20 bool RequestCoordinator::SavePageLater(const SavePageRequest& request) { | 25 bool RequestCoordinator::SavePageLater(const SavePageRequest& request) { |
| 21 return true; | 26 return true; |
| 22 } | 27 } |
| 23 | 28 |
| 24 bool RequestCoordinator::StartProcessing( | 29 bool RequestCoordinator::StartProcessing( |
| 25 const ProcessingDoneCallback& callback) { | 30 const ProcessingDoneCallback& callback) { |
| 26 return false; | 31 return false; |
| 27 } | 32 } |
| 28 | 33 |
| 29 void RequestCoordinator::StopProcessing() { | 34 void RequestCoordinator::StopProcessing() { |
| 30 } | 35 } |
| 31 | 36 |
| 32 } // namespace offline_pages | 37 } // namespace offline_pages |
| OLD | NEW |