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

Side by Side Diff: components/offline_pages/core/background/offliner.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
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 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_OFFLINER_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_OFFLINER_H_
6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_OFFLINER_H_ 6 #define COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_OFFLINER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 11
12 namespace offline_pages { 12 namespace offline_pages {
13 13
14 class SavePageRequest; 14 class SavePageRequest;
15 15
16 // Interface of a class responsible for constructing an offline page given 16 // Interface of a class responsible for constructing an offline page given
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // TODO(dougarnett): consider passing back a request id instead of request. 52 // TODO(dougarnett): consider passing back a request id instead of request.
53 typedef base::Callback<void(const SavePageRequest&, RequestStatus)> 53 typedef base::Callback<void(const SavePageRequest&, RequestStatus)>
54 CompletionCallback; 54 CompletionCallback;
55 55
56 Offliner() {} 56 Offliner() {}
57 virtual ~Offliner() {} 57 virtual ~Offliner() {}
58 58
59 // Processes |request| to load and save an offline page. 59 // Processes |request| to load and save an offline page.
60 // Returns whether the request was accepted or not. |callback| is guaranteed 60 // Returns whether the request was accepted or not. |callback| is guaranteed
61 // to be called if the request was accepted and |Cancel()| is not called. 61 // to be called if the request was accepted and |Cancel()| is not called.
62 virtual bool LoadAndSave( 62 virtual bool LoadAndSave(const SavePageRequest& request,
63 const SavePageRequest& request, 63 const CompletionCallback& callback) = 0;
64 const CompletionCallback& callback) = 0;
65 64
66 // Clears the currently processing request, if any, and skips running its 65 // Clears the currently processing request, if any, and skips running its
67 // CompletionCallback. 66 // CompletionCallback.
68 virtual void Cancel() = 0; 67 virtual void Cancel() = 0;
69 68
70 // TODO(dougarnett): add policy support methods. 69 // TODO(dougarnett): add policy support methods.
71 }; 70 };
72 71
73 } // namespace offline_pages 72 } // namespace offline_pages
74 73
75 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_OFFLINER_H_ 74 #endif // COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_OFFLINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698