chromium/chrome/browser/chained_back_navigation_tracker.h

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

#ifndef CHROME_BROWSER_CHAINED_BACK_NAVIGATION_TRACKER_H_
#define CHROME_BROWSER_CHAINED_BACK_NAVIGATION_TRACKER_H_

#include "base/gtest_prod_util.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"

namespace chrome {

// This class tracks chained back navigations (consecutive back navigations with
// a short interval between them) by observing navigation events from
// WebContents and providing functions to record back button clicks.
class ChainedBackNavigationTracker
    : public content::WebContentsObserver,
      public content::WebContentsUserData<ChainedBackNavigationTracker> {};

}  // namespace chrome

#endif  // CHROME_BROWSER_CHAINED_BACK_NAVIGATION_TRACKER_H_