Chromium Code Reviews| Index: components/offline_pages/storage_manager_client.h |
| diff --git a/components/offline_pages/storage_manager_client.h b/components/offline_pages/storage_manager_client.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..49f44098db845bf27d57172cb6ec87071603f423 |
| --- /dev/null |
| +++ b/components/offline_pages/storage_manager_client.h |
| @@ -0,0 +1,41 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_OFFLINE_PAGES_STORAGE_MANAGER_CLIENT_H_ |
| +#define COMPONENTS_OFFLINE_PAGES_STORAGE_MANAGER_CLIENT_H_ |
| + |
| +#include <stdint.h> |
| + |
| +#include <vector> |
| + |
| +#include "base/callback.h" |
| +#include "components/offline_pages/offline_page_types.h" |
| + |
| +namespace offline_pages { |
| + |
| +class ClientPolicyController; |
| +struct OfflinePageItem; |
| + |
| +// 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.
|
| +// provide the functionalities for storage manager. |
| +class StorageManagerClient { |
| + public: |
| + // Asks the client to get all offline pages and invoke |callback|. |
| + virtual void GetAllPages(const MultipleOfflinePageItemCallback& callback) = 0; |
| + |
| + // Asks the client to delete pages based on |offline_ids| and invoke |
| + // |callback|. |
| + virtual void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids, |
| + const DeletePageCallback& callback) = 0; |
| + |
| + // Get the policy controller from the client. |
| + virtual ClientPolicyController* GetPolicyController() = 0; |
| + |
| + // Returns true if the client is fully loaded. |
| + virtual bool IsLoaded() const = 0; |
| +}; |
| + |
| +} // namespace offline_pages |
| + |
| +#endif // COMPONENTS_OFFLINE_PAGES_STORAGE_MANAGER_CLIENT_H_ |