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

Side by Side 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: CR fixes per DougArnett and FGorski 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 unified diff | Download patch
OLDNEW
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.
fgorski 2016/05/04 05:20:58 I think you can resolve the TODO now.
Pete Williamson 2016/05/04 21:23:21 Done, also moved added the save_page_request.h inc
8 #include "components/offline_pages/background/offliner_policy.h"
8 9
9 namespace offline_pages { 10 namespace offline_pages {
10 11
11 // TODO(dougarnett): How to inject Offliner factories and policy objects. 12 RequestCoordinator::RequestCoordinator(
12 RequestCoordinator::RequestCoordinator() { 13 OfflinerPolicy* policy, OfflinerFactory* factory) {
13 // Do setup as needed. 14 // Do setup as needed.
15 // TODO(petewil): Assert policy not null.
16 policy_ = policy;
17 factory_ = factory;
14 } 18 }
15 19
16 RequestCoordinator::~RequestCoordinator() { 20 RequestCoordinator::~RequestCoordinator() {
17 // Do cleanup as needed. 21 delete policy_;
18 } 22 }
19 23
20 bool RequestCoordinator::SavePageLater(const SavePageRequest& request) { 24 bool RequestCoordinator::SavePageLater(const SavePageRequest& request) {
21 return true; 25 return true;
22 } 26 }
23 27
24 bool RequestCoordinator::StartProcessing( 28 bool RequestCoordinator::StartProcessing(
25 const ProcessingDoneCallback& callback) { 29 const ProcessingDoneCallback& callback) {
26 return false; 30 return false;
27 } 31 }
28 32
29 void RequestCoordinator::StopProcessing() { 33 void RequestCoordinator::StopProcessing() {
30 } 34 }
31 35
32 } // namespace offline_pages 36 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698