chromium/chrome/browser/webapps/web_app_offline.cc

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

#include "chrome/browser/webapps/web_app_offline.h"

#include "base/metrics/histogram_macros.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/browser/web_applications/web_app_utils.h"
#include "components/strings/grit/components_strings.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "ui/base/l10n/l10n_util.h"

namespace {

// These values are persistent to logs. Entries should not be renumbered and
// numeric values should never be reused. This should match the enum
// ClosingReason in tools/metrics/histograms/enums.xml.
enum class ClosingReason {};

// This class keeps track of how long the DefaultOffline page is shown, before
// either a navigation happens (e.g. when the connection is re-established), or
// the web_contents dies (e.g. because the user killed the app). The class
// manages its own lifetime by deleting itself when either of those two
// conditions above are met.
class DefaultOfflineWebContentsObserver : public content::WebContentsObserver {};

}  // namespace

namespace web_app {

#if !BUILDFLAG(IS_ANDROID)
content::mojom::AlternativeErrorPageOverrideInfoPtr GetOfflinePageInfo(
    const GURL& url,
    content::RenderFrameHost* render_frame_host,
    content::BrowserContext* browser_context) {}
#endif  // !BUILDFLAG(IS_ANDROID)

void TrackOfflinePageVisibility(content::RenderFrameHost* render_frame_host) {}

}  // namespace web_app