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

Side by Side Diff: components/offline_pages/background/request_coordinator.cc

Issue 1956633002: Menu hook plumbed through to RequestCoordinator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove reference to unit test which I forgot to include 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 #include <utility> 7 #include <utility>
8 8
9 #include "components/offline_pages/background/offliner_factory.h" 9 #include "components/offline_pages/background/offliner_factory.h"
10 #include "components/offline_pages/background/offliner_policy.h" 10 #include "components/offline_pages/background/offliner_policy.h"
11 #include "components/offline_pages/background/save_page_request.h" 11 #include "components/offline_pages/background/save_page_request.h"
12 #include "components/offline_pages/offline_page_item.h"
12 13
13 namespace offline_pages { 14 namespace offline_pages {
14 15
15 RequestCoordinator::RequestCoordinator( 16 RequestCoordinator::RequestCoordinator(
16 std::unique_ptr<OfflinerPolicy> policy, 17 std::unique_ptr<OfflinerPolicy> policy,
17 std::unique_ptr<OfflinerFactory> factory) { 18 std::unique_ptr<OfflinerFactory> factory) {
18 // Do setup as needed. 19 // Do setup as needed.
19 // TODO(petewil): Assert policy not null. 20 // TODO(petewil): Assert policy not null.
20 policy_ = std::move(policy); 21 policy_ = std::move(policy);
21 factory_ = std::move(factory); 22 factory_ = std::move(factory);
22 } 23 }
23 24
24 RequestCoordinator::~RequestCoordinator() {} 25 RequestCoordinator::~RequestCoordinator() {}
25 26
26 bool RequestCoordinator::SavePageLater(const SavePageRequest& request) { 27 bool RequestCoordinator::SavePageLater(
28 const GURL& url, const ClientId& client_id) {
29
30 // TODO(petewil): We need a robust scheme for allocating new IDs.
31 // TODO(petewil): Build a SavePageRequest.
32 // TODO(petewil): Put the request on the request queue, nudge the scheduler.
33
27 return true; 34 return true;
28 } 35 }
29 36
30 bool RequestCoordinator::StartProcessing( 37 bool RequestCoordinator::StartProcessing(
31 const ProcessingDoneCallback& callback) { 38 const ProcessingDoneCallback& callback) {
32 return false; 39 return false;
33 } 40 }
34 41
35 void RequestCoordinator::StopProcessing() { 42 void RequestCoordinator::StopProcessing() {
36 } 43 }
37 44
38 } // namespace offline_pages 45 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698