chore: bump chromium to 92.0.4496.0 (master) (#28907)
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
99909baeac
commit
005101424a
82 changed files with 340 additions and 320 deletions
|
@ -233,8 +233,7 @@ v8::Local<v8::Promise> Cookies::Get(v8::Isolate* isolate,
|
|||
gin_helper::Promise<net::CookieList> promise(isolate);
|
||||
v8::Local<v8::Promise> handle = promise.GetHandle();
|
||||
|
||||
auto* storage_partition =
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_);
|
||||
auto* storage_partition = browser_context_->GetDefaultStoragePartition();
|
||||
auto* manager = storage_partition->GetCookieManagerForBrowserProcess();
|
||||
|
||||
base::DictionaryValue dict;
|
||||
|
@ -270,8 +269,7 @@ v8::Local<v8::Promise> Cookies::Remove(v8::Isolate* isolate,
|
|||
cookie_deletion_filter->url = url;
|
||||
cookie_deletion_filter->cookie_name = name;
|
||||
|
||||
auto* storage_partition =
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_);
|
||||
auto* storage_partition = browser_context_->GetDefaultStoragePartition();
|
||||
auto* manager = storage_partition->GetCookieManagerForBrowserProcess();
|
||||
|
||||
manager->DeleteCookies(
|
||||
|
@ -339,8 +337,7 @@ v8::Local<v8::Promise> Cookies::Set(v8::Isolate* isolate,
|
|||
options.set_same_site_cookie_context(
|
||||
net::CookieOptions::SameSiteCookieContext::MakeInclusive());
|
||||
|
||||
auto* storage_partition =
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_);
|
||||
auto* storage_partition = browser_context_->GetDefaultStoragePartition();
|
||||
auto* manager = storage_partition->GetCookieManagerForBrowserProcess();
|
||||
manager->SetCanonicalCookie(
|
||||
*canonical_cookie, url, options,
|
||||
|
@ -361,8 +358,7 @@ v8::Local<v8::Promise> Cookies::FlushStore(v8::Isolate* isolate) {
|
|||
gin_helper::Promise<void> promise(isolate);
|
||||
v8::Local<v8::Promise> handle = promise.GetHandle();
|
||||
|
||||
auto* storage_partition =
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_);
|
||||
auto* storage_partition = browser_context_->GetDefaultStoragePartition();
|
||||
auto* manager = storage_partition->GetCookieManagerForBrowserProcess();
|
||||
|
||||
manager->FlushCookieStore(base::BindOnce(
|
||||
|
|
|
@ -132,8 +132,7 @@ v8::Local<v8::Promise> NetLog::StartLogging(base::FilePath log_path,
|
|||
command_line_string, channel_string));
|
||||
|
||||
auto* network_context =
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_)
|
||||
->GetNetworkContext();
|
||||
browser_context_->GetDefaultStoragePartition()->GetNetworkContext();
|
||||
|
||||
network_context->CreateNetLogExporter(mojo::MakeRequest(&net_log_exporter_));
|
||||
net_log_exporter_.set_connection_error_handler(base::BindOnce(
|
||||
|
|
|
@ -74,11 +74,9 @@ gin::WrapperInfo ServiceWorkerContext::kWrapperInfo = {gin::kEmbedderNativeGin};
|
|||
|
||||
ServiceWorkerContext::ServiceWorkerContext(
|
||||
v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context)
|
||||
: browser_context_(browser_context) {
|
||||
ElectronBrowserContext* browser_context) {
|
||||
service_worker_context_ =
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_)
|
||||
->GetServiceWorkerContext();
|
||||
browser_context->GetDefaultStoragePartition()->GetServiceWorkerContext();
|
||||
service_worker_context_->AddObserver(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -49,8 +49,6 @@ class ServiceWorkerContext
|
|||
~ServiceWorkerContext() override;
|
||||
|
||||
private:
|
||||
ElectronBrowserContext* browser_context_;
|
||||
|
||||
content::ServiceWorkerContext* service_worker_context_;
|
||||
|
||||
base::WeakPtrFactory<ServiceWorkerContext> weak_ptr_factory_{this};
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "base/guid.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/task/post_task.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
|
@ -420,7 +421,7 @@ v8::Local<v8::Promise> Session::GetCacheSize() {
|
|||
gin_helper::Promise<int64_t> promise(isolate_);
|
||||
auto handle = promise.GetHandle();
|
||||
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_)
|
||||
browser_context_->GetDefaultStoragePartition()
|
||||
->GetNetworkContext()
|
||||
->ComputeHttpCacheSize(
|
||||
base::Time(), base::Time::Max(),
|
||||
|
@ -443,7 +444,7 @@ v8::Local<v8::Promise> Session::ClearCache() {
|
|||
gin_helper::Promise<void> promise(isolate_);
|
||||
auto handle = promise.GetHandle();
|
||||
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_)
|
||||
browser_context_->GetDefaultStoragePartition()
|
||||
->GetNetworkContext()
|
||||
->ClearHttpCache(base::Time(), base::Time::Max(), nullptr,
|
||||
base::BindOnce(gin_helper::Promise<void>::ResolvePromise,
|
||||
|
@ -460,8 +461,7 @@ v8::Local<v8::Promise> Session::ClearStorageData(gin::Arguments* args) {
|
|||
ClearStorageDataOptions options;
|
||||
args->GetNext(&options);
|
||||
|
||||
auto* storage_partition =
|
||||
content::BrowserContext::GetStoragePartition(browser_context(), nullptr);
|
||||
auto* storage_partition = browser_context()->GetStoragePartition(nullptr);
|
||||
if (options.storage_types & StoragePartition::REMOVE_DATA_MASK_COOKIES) {
|
||||
// Reset media device id salt when cookies are cleared.
|
||||
// https://w3c.github.io/mediacapture-main/#dom-mediadeviceinfo-deviceid
|
||||
|
@ -477,8 +477,7 @@ v8::Local<v8::Promise> Session::ClearStorageData(gin::Arguments* args) {
|
|||
}
|
||||
|
||||
void Session::FlushStorageData() {
|
||||
auto* storage_partition =
|
||||
content::BrowserContext::GetStoragePartition(browser_context(), nullptr);
|
||||
auto* storage_partition = browser_context()->GetStoragePartition(nullptr);
|
||||
storage_partition->Flush();
|
||||
}
|
||||
|
||||
|
@ -551,7 +550,7 @@ v8::Local<v8::Promise> Session::ForceReloadProxyConfig() {
|
|||
gin_helper::Promise<void> promise(isolate_);
|
||||
auto handle = promise.GetHandle();
|
||||
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_)
|
||||
browser_context_->GetDefaultStoragePartition()
|
||||
->GetNetworkContext()
|
||||
->ForceReloadProxyConfig(base::BindOnce(
|
||||
gin_helper::Promise<void>::ResolvePromise, std::move(promise)));
|
||||
|
@ -576,16 +575,14 @@ void Session::EnableNetworkEmulation(const gin_helper::Dictionary& options) {
|
|||
}
|
||||
|
||||
auto* network_context =
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_)
|
||||
->GetNetworkContext();
|
||||
browser_context_->GetDefaultStoragePartition()->GetNetworkContext();
|
||||
network_context->SetNetworkConditions(network_emulation_token_,
|
||||
std::move(conditions));
|
||||
}
|
||||
|
||||
void Session::DisableNetworkEmulation() {
|
||||
auto* network_context =
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_)
|
||||
->GetNetworkContext();
|
||||
browser_context_->GetDefaultStoragePartition()->GetNetworkContext();
|
||||
network_context->SetNetworkConditions(
|
||||
network_emulation_token_, network::mojom::NetworkConditions::New());
|
||||
}
|
||||
|
@ -605,7 +602,7 @@ void Session::SetCertVerifyProc(v8::Local<v8::Value> val,
|
|||
std::make_unique<CertVerifierClient>(proc),
|
||||
cert_verifier_client_remote.InitWithNewPipeAndPassReceiver());
|
||||
}
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_)
|
||||
browser_context_->GetDefaultStoragePartition()
|
||||
->GetNetworkContext()
|
||||
->SetCertVerifierClient(std::move(cert_verifier_client_remote));
|
||||
}
|
||||
|
@ -654,7 +651,7 @@ v8::Local<v8::Promise> Session::ClearHostResolverCache(gin::Arguments* args) {
|
|||
gin_helper::Promise<void> promise(isolate);
|
||||
v8::Local<v8::Promise> handle = promise.GetHandle();
|
||||
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_)
|
||||
browser_context_->GetDefaultStoragePartition()
|
||||
->GetNetworkContext()
|
||||
->ClearHostCache(nullptr,
|
||||
base::BindOnce(gin_helper::Promise<void>::ResolvePromise,
|
||||
|
@ -667,7 +664,7 @@ v8::Local<v8::Promise> Session::ClearAuthCache() {
|
|||
gin_helper::Promise<void> promise(isolate_);
|
||||
v8::Local<v8::Promise> handle = promise.GetHandle();
|
||||
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_)
|
||||
browser_context_->GetDefaultStoragePartition()
|
||||
->GetNetworkContext()
|
||||
->ClearHttpAuthCache(
|
||||
base::Time(), base::Time::Max(),
|
||||
|
@ -694,8 +691,7 @@ void Session::SetUserAgent(const std::string& user_agent,
|
|||
gin::Arguments* args) {
|
||||
browser_context_->SetUserAgent(user_agent);
|
||||
auto* network_context =
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_)
|
||||
->GetNetworkContext();
|
||||
browser_context_->GetDefaultStoragePartition()->GetNetworkContext();
|
||||
network_context->SetUserAgent(user_agent);
|
||||
|
||||
std::string accept_lang;
|
||||
|
@ -956,7 +952,7 @@ v8::Local<v8::Promise> Session::CloseAllConnections() {
|
|||
gin_helper::Promise<void> promise(isolate_);
|
||||
auto handle = promise.GetHandle();
|
||||
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_)
|
||||
browser_context_->GetDefaultStoragePartition()
|
||||
->GetNetworkContext()
|
||||
->CloseAllConnections(base::BindOnce(
|
||||
gin_helper::Promise<void>::ResolvePromise, std::move(promise)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue