Skip to content

Commit

Permalink
Use recommended StoragePartition get method instead of a deprecated one.
Browse files Browse the repository at this point in the history
  • Loading branch information
goodov committed Nov 3, 2021
1 parent 5fe543e commit 4752dca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/ephemeral_storage/ephemeral_storage_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/site_instance.h"
#include "net/base/features.h"

namespace ephemeral_storage {
Expand All @@ -32,12 +33,13 @@ EphemeralStorageService::~EphemeralStorageService() {}
void EphemeralStorageService::CanEnable1PESForUrl(
const GURL& url,
base::OnceCallback<void(bool can_enable_1pes)> callback) const {
auto site_instance = content::SiteInstance::CreateForURL(context_, url);
auto* storage_partition = context_->GetStoragePartition(site_instance.get());
base::SequencedTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::BindOnce(&UrlStorageChecker::StartCheck,
base::MakeRefCounted<UrlStorageChecker>(
context_->GetStoragePartitionForUrl(url, true), url,
std::move(callback))));
storage_partition, url, std::move(callback))));
}

void EphemeralStorageService::Set1PESEnabledForUrl(const GURL& url,
Expand Down

0 comments on commit 4752dca

Please sign in to comment.