Skip to content

Commit

Permalink
Use CanAccessStorageAreaWithoutEphemeralStorage instead
Browse files Browse the repository at this point in the history
  • Loading branch information
cathiechen committed Nov 20, 2020
1 parent 152d071 commit e28d018
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ StorageArea* BraveDOMWindowStorage::sessionStorage(
if (!storage)
return nullptr;

if (StorageController::CanAccessStorageAreaWithoutEphemeral(
if (StorageController::CanAccessStorageAreaWithoutEphemeralStorage(
window->GetFrame(), StorageArea::StorageType::kSessionStorage))
return storage;

Expand Down Expand Up @@ -213,7 +213,7 @@ StorageArea* BraveDOMWindowStorage::localStorage(
if (!storage)
return nullptr;

if (StorageController::CanAccessStorageAreaWithoutEphemeral(
if (StorageController::CanAccessStorageAreaWithoutEphemeralStorage(
window->GetFrame(), StorageArea::StorageType::kSessionStorage))
return storage;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace blink {
// static
bool StorageController::CanAccessStorageArea(LocalFrame* frame,
StorageArea::StorageType type) {
if (CanAccessStorageAreaWithoutEphemeral(frame, type))
if (CanAccessStorageAreaWithoutEphemeralStorage(frame, type))
return true;
if (frame && frame->GetDocument() && frame->GetDocument()->domWindow() &&
frame->GetDocument()->domWindow()->IsCrossSiteSubframe())
Expand All @@ -24,6 +24,6 @@ bool StorageController::CanAccessStorageArea(LocalFrame* frame,

} // namespace blink

#define CanAccessStorageArea CanAccessStorageAreaWithoutEphemeral
#define CanAccessStorageArea CanAccessStorageAreaWithoutEphemeralStorage
#include "../../../../../../../third_party/blink/renderer/modules/storage/storage_controller.cc"
#undef CanAccessStorageAreaWithoutEphemeral
#undef CanAccessStorageAreaWithoutEphemeralStorage
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#ifndef BRAVE_CHROMIUM_SRC_THIRD_PARTY_BLINK_RENDERER_MODULES_STORAGE_STORAGE_CONTROLLER_H_
#define BRAVE_CHROMIUM_SRC_THIRD_PARTY_BLINK_RENDERER_MODULES_STORAGE_STORAGE_CONTROLLER_H_

#define BRAVE_STORAGE_CONTROLLER_H \
public: \
static bool CanAccessStorageAreaWithoutEphemeral( \
#define BRAVE_STORAGE_CONTROLLER_H \
public: \
static bool CanAccessStorageAreaWithoutEphemeralStorage( \
LocalFrame* frame, StorageArea::StorageType type);

#include "../../../../../../../third_party/blink/renderer/modules/storage/storage_controller.h"
Expand Down

0 comments on commit e28d018

Please sign in to comment.