From e28d0180ebebe3381ae8f9a46642b8d90a81fe22 Mon Sep 17 00:00:00 2001 From: Cathie Chen Date: Fri, 20 Nov 2020 17:09:57 +0800 Subject: [PATCH] Use CanAccessStorageAreaWithoutEphemeralStorage instead --- .../blink/renderer/modules/storage/dom_window_storage.cc | 4 ++-- .../blink/renderer/modules/storage/storage_controller.cc | 6 +++--- .../blink/renderer/modules/storage/storage_controller.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/chromium_src/third_party/blink/renderer/modules/storage/dom_window_storage.cc b/chromium_src/third_party/blink/renderer/modules/storage/dom_window_storage.cc index 94be7731c126..efdba85deadd 100644 --- a/chromium_src/third_party/blink/renderer/modules/storage/dom_window_storage.cc +++ b/chromium_src/third_party/blink/renderer/modules/storage/dom_window_storage.cc @@ -175,7 +175,7 @@ StorageArea* BraveDOMWindowStorage::sessionStorage( if (!storage) return nullptr; - if (StorageController::CanAccessStorageAreaWithoutEphemeral( + if (StorageController::CanAccessStorageAreaWithoutEphemeralStorage( window->GetFrame(), StorageArea::StorageType::kSessionStorage)) return storage; @@ -213,7 +213,7 @@ StorageArea* BraveDOMWindowStorage::localStorage( if (!storage) return nullptr; - if (StorageController::CanAccessStorageAreaWithoutEphemeral( + if (StorageController::CanAccessStorageAreaWithoutEphemeralStorage( window->GetFrame(), StorageArea::StorageType::kSessionStorage)) return storage; diff --git a/chromium_src/third_party/blink/renderer/modules/storage/storage_controller.cc b/chromium_src/third_party/blink/renderer/modules/storage/storage_controller.cc index 1e802be915e1..d9b689becb07 100644 --- a/chromium_src/third_party/blink/renderer/modules/storage/storage_controller.cc +++ b/chromium_src/third_party/blink/renderer/modules/storage/storage_controller.cc @@ -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()) @@ -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 diff --git a/chromium_src/third_party/blink/renderer/modules/storage/storage_controller.h b/chromium_src/third_party/blink/renderer/modules/storage/storage_controller.h index 4a8e1f498287..3da844fc898a 100644 --- a/chromium_src/third_party/blink/renderer/modules/storage/storage_controller.h +++ b/chromium_src/third_party/blink/renderer/modules/storage/storage_controller.h @@ -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"