diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/content/browser/dom_storage | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/content/browser/dom_storage')
3 files changed, 13 insertions, 13 deletions
diff --git a/chromium/content/browser/dom_storage/dom_storage_context_wrapper.cc b/chromium/content/browser/dom_storage/dom_storage_context_wrapper.cc index 119d7cd3a24..19a83ec8132 100644 --- a/chromium/content/browser/dom_storage/dom_storage_context_wrapper.cc +++ b/chromium/content/browser/dom_storage/dom_storage_context_wrapper.cc @@ -94,8 +94,8 @@ class DOMStorageContextWrapper::StoragePolicyObserver if (!context_wrapper_) return; - base::PostTask( - FROM_HERE, {BrowserThread::UI}, + GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&DOMStorageContextWrapper::OnStoragePolicyChanged, context_wrapper_)); } @@ -127,9 +127,10 @@ DOMStorageContextWrapper::DOMStorageContextWrapper( StoragePartitionImpl* partition, storage::SpecialStoragePolicy* special_storage_policy) : partition_(partition), storage_policy_(special_storage_policy) { - memory_pressure_listener_.reset(new base::MemoryPressureListener( + memory_pressure_listener_ = std::make_unique<base::MemoryPressureListener>( + FROM_HERE, base::BindRepeating(&DOMStorageContextWrapper::OnMemoryPressure, - base::Unretained(this)))); + base::Unretained(this))); MaybeBindSessionStorageControl(); MaybeBindLocalStorageControl(); diff --git a/chromium/content/browser/dom_storage/dom_storage_context_wrapper_unittest.cc b/chromium/content/browser/dom_storage/dom_storage_context_wrapper_unittest.cc index b2fd15c94ed..04b9a352fe9 100644 --- a/chromium/content/browser/dom_storage/dom_storage_context_wrapper_unittest.cc +++ b/chromium/content/browser/dom_storage/dom_storage_context_wrapper_unittest.cc @@ -10,6 +10,7 @@ #include "base/guid.h" #include "base/run_loop.h" #include "content/browser/child_process_security_policy_impl.h" +#include "content/browser/site_instance_impl.h" #include "content/public/test/browser_task_environment.h" #include "content/public/test/test_browser_context.h" #include "mojo/public/cpp/bindings/message.h" @@ -36,12 +37,11 @@ class DOMStorageContextWrapperTest : public testing::Test { security_policy->AddIsolatedOrigins( {test_origin1_, test_origin2_}, ChildProcessSecurityPolicy::IsolatedOriginSource::TEST); - security_policy->LockToOrigin(IsolationContext(&browser_context_), - kTestProcessIdOrigin1, - test_origin1_.GetURL()); - security_policy->LockToOrigin(IsolationContext(&browser_context_), - kTestProcessIdOrigin2, - test_origin2_.GetURL()); + IsolationContext isolation_context(&browser_context_); + security_policy->LockProcessForTesting( + isolation_context, kTestProcessIdOrigin1, test_origin1_.GetURL()); + security_policy->LockProcessForTesting( + isolation_context, kTestProcessIdOrigin2, test_origin2_.GetURL()); } void TearDown() override { diff --git a/chromium/content/browser/dom_storage/session_storage_namespace_impl.cc b/chromium/content/browser/dom_storage/session_storage_namespace_impl.cc index bc18031e6be..1d01ca2f661 100644 --- a/chromium/content/browser/dom_storage/session_storage_namespace_impl.cc +++ b/chromium/content/browser/dom_storage/session_storage_namespace_impl.cc @@ -9,7 +9,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" #include "base/memory/ptr_util.h" -#include "base/task/post_task.h" #include "components/services/storage/public/mojom/session_storage_control.mojom.h" #include "content/browser/dom_storage/dom_storage_context_wrapper.h" #include "content/public/browser/browser_task_traits.h" @@ -102,8 +101,8 @@ SessionStorageNamespaceImpl::~SessionStorageNamespaceImpl() { if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { // If this fails to post then that's fine, as the mojo state should // already be destructed. - base::PostTask(FROM_HERE, {BrowserThread::UI}, - deleteNamespaceRunner.Release()); + GetUIThreadTaskRunner({})->PostTask(FROM_HERE, + deleteNamespaceRunner.Release()); } } |