chromium/components/offline_pages/core/offline_store_types.h

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_STORE_TYPES_H_
#define COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_STORE_TYPES_H_

#include <stdint.h>

#include <utility>
#include <vector>

// This file contains common types and callbacks used by storage of various
// offline page related components.
namespace offline_pages {

// Current store state. When LOADED, the store is operational. When
// loading or reset fails, it is reflected appropriately.
enum class StoreState {};

// Statuses referring to actions taken on items in the stores.
// GENERATED_JAVA_ENUM_PACKAGE:org.chromium.components.offlinepages
enum class ItemActionStatus {};

// Result for synchronous operations (like database and file operations) that
// are part of the tasks used by Offline Pages.
// Keep it in sync with OfflinePagesSyncOperationResult in enums.xml for
// histograms usages.
enum class SyncOperationResult {};

// List of item action statuses mapped to item ID.
MultipleItemStatuses;

// Collective result for store update.
template <typename T>
class StoreUpdateResult {};

// This enum is backed by a UMA histogram therefore its entries should not be
// deleted or re-ordered and new ones should only be appended.
// See enum definition with the same name in tools/metrics/histograms/enums.xml.
enum class OfflinePagesStoreEvent {};

}  // namespace offline_pages

#endif  // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_STORE_TYPES_H_