blob: 70e05be3e92ae0eb8a086de61216985aa6deed20 [file] [log] [blame]
// 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 "content/browser/attribution_reporting/attribution_manager.h"
#include "base/check.h"
#include "content/browser/storage_partition_impl.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
namespace content {
// static
AttributionManager* AttributionManager::FromWebContents(
WebContents* web_contents) {
DCHECK(web_contents);
return static_cast<StoragePartitionImpl*>(
web_contents->GetBrowserContext()->GetDefaultStoragePartition())
->GetAttributionManager();
}
} // namespace content