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

Side by Side Diff: components/offline_pages/background/offliner_stub.h

Issue 2489443002: Move all components/offline_pages/ files into component/offline_pages/core (Closed)
Patch Set: more rebase Created 4 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_OFFLINER_STUB_H_
6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_OFFLINER_STUB_H_
7
8 #include "components/offline_pages/background/offliner.h"
9
10 namespace offline_pages {
11
12 // Test class stubbing out the functionality of Offliner.
13 // It is only used for test support.
14 class OfflinerStub : public Offliner {
15 public:
16 OfflinerStub();
17 ~OfflinerStub() override;
18
19 bool LoadAndSave(const SavePageRequest& request,
20 const CompletionCallback& callback) override;
21
22 void Cancel() override;
23
24 void disable_loading() { disable_loading_ = true; }
25
26 void enable_callback(bool enable) { enable_callback_ = enable; }
27
28 bool cancel_called() { return cancel_called_; }
29
30 private:
31 CompletionCallback callback_;
32 bool disable_loading_;
33 bool enable_callback_;
34 bool cancel_called_;
35 };
36
37 } // namespace offline_pages
38
39 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_OFFLINER_STUB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698