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

Side by Side Diff: components/offline_pages/storage_manager_client.h

Issue 1965633002: [Offline Pages] Introducing StorageManagerClient interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing after extracting callbacks. 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
(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_STORAGE_MANAGER_CLIENT_H_
6 #define COMPONENTS_OFFLINE_PAGES_STORAGE_MANAGER_CLIENT_H_
7
8 #include <stdint.h>
9
10 #include <vector>
11
12 #include "base/callback.h"
13 #include "components/offline_pages/offline_page_types.h"
14
15 namespace offline_pages {
16
17 class ClientPolicyController;
18 struct OfflinePageItem;
19
20 // This is an interface for offline page model to implement, in order to
fgorski 2016/05/11 22:39:00 This interface should presume no knowledge or exis
romax 2016/05/11 23:54:58 Acknowledged.
21 // provide the functionalities for storage manager.
22 class StorageManagerClient {
23 public:
24 // Asks the client to get all offline pages and invoke |callback|.
25 virtual void GetAllPages(const MultipleOfflinePageItemCallback& callback) = 0;
26
27 // Asks the client to delete pages based on |offline_ids| and invoke
28 // |callback|.
29 virtual void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids,
30 const DeletePageCallback& callback) = 0;
31
32 // Get the policy controller from the client.
33 virtual ClientPolicyController* GetPolicyController() = 0;
34
35 // Returns true if the client is fully loaded.
36 virtual bool IsLoaded() const = 0;
37 };
38
39 } // namespace offline_pages
40
41 #endif // COMPONENTS_OFFLINE_PAGES_STORAGE_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698