chromium/components/offline_pages/core/offline_page_model.h

// Copyright 2015 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_PAGE_MODEL_H_
#define COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_MODEL_H_

#include <stdint.h>

#include <memory>
#include <set>
#include <string>

#include "build/build_config.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/offline_pages/core/offline_event_logger.h"
#include "components/offline_pages/core/offline_page_archive_publisher.h"
#include "components/offline_pages/core/offline_page_archiver.h"
#include "components/offline_pages/core/offline_page_types.h"
#include "components/offline_pages/core/offline_page_visuals.h"
#include "components/offline_pages/core/page_criteria.h"
#include "url/gurl.h"

#if BUILDFLAG(IS_ANDROID)
#include "base/supports_user_data.h"
#endif

namespace offline_pages {

struct ClientId;

// Service for saving pages offline, storing the offline copy and metadata, and
// retrieving them upon request.
//
// DownloadUIAdapter instances can be optionally attached to OfflinePageModel
// using base::SupportsUserData. This is limited to Android, as
// DownloadUIAdapter is only used on Android.
//
// TODO(fgorski): Things to describe:
// * how to cancel requests and what to expect
class OfflinePageModel :
#if BUILDFLAG(IS_ANDROID)
    public base::SupportsUserData,
#endif
    public KeyedService {};

}  // namespace offline_pages

#endif  // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_MODEL_H_