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)));
|
||||
|
|
|
@ -37,7 +37,7 @@ void CookieChangeNotifier::StartListening() {
|
|||
DCHECK(!receiver_.is_bound());
|
||||
|
||||
network::mojom::CookieManager* cookie_manager =
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_)
|
||||
browser_context_->GetDefaultStoragePartition()
|
||||
->GetCookieManagerForBrowserProcess();
|
||||
|
||||
// Cookie manager should be created whenever network context is created,
|
||||
|
|
|
@ -347,8 +347,7 @@ ElectronBrowserContext::GetURLLoaderFactory() {
|
|||
// the non-NetworkService implementation always has web security enabled.
|
||||
params->disable_web_security = false;
|
||||
|
||||
auto* storage_partition =
|
||||
content::BrowserContext::GetDefaultStoragePartition(this);
|
||||
auto* storage_partition = GetDefaultStoragePartition();
|
||||
params->url_loader_network_observer =
|
||||
storage_partition->CreateURLLoaderNetworkObserverForNavigationRequest(-1);
|
||||
storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
|
||||
|
|
|
@ -287,8 +287,8 @@ void ElectronBrowserMainParts::PostEarlyInitialization() {
|
|||
|
||||
int ElectronBrowserMainParts::PreCreateThreads() {
|
||||
#if defined(USE_AURA)
|
||||
display::Screen* screen = views::CreateDesktopScreen();
|
||||
display::Screen::SetScreenInstance(screen);
|
||||
screen_ = views::CreateDesktopScreen();
|
||||
display::Screen::SetScreenInstance(screen_.get());
|
||||
#if defined(OS_LINUX)
|
||||
views::LinuxUI::instance()->UpdateDeviceScaleFactor();
|
||||
#endif
|
||||
|
|
|
@ -28,6 +28,10 @@ class IconManager;
|
|||
namespace wm {
|
||||
class WMState;
|
||||
}
|
||||
|
||||
namespace display {
|
||||
class Screen;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(USE_X11)
|
||||
|
@ -126,6 +130,7 @@ class ElectronBrowserMainParts : public content::BrowserMainParts {
|
|||
|
||||
#if defined(USE_AURA)
|
||||
std::unique_ptr<wm::WMState> wm_state_;
|
||||
std::unique_ptr<display::Screen> screen_;
|
||||
#endif
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "base/bind.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/strings/strcat.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/task/post_task.h"
|
||||
#include "chrome/common/extensions/extension_metrics.h"
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "base/guid.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/storage_partition.h"
|
||||
#include "mojo/public/cpp/system/data_pipe_producer.h"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "base/command_line.h"
|
||||
#include "base/strings/string_split.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "content/public/browser/browser_context.h"
|
||||
#include "extensions/browser/extension_navigation_ui_data.h"
|
||||
#include "net/base/completion_repeating_callback.h"
|
||||
|
|
|
@ -53,7 +53,7 @@ void ResolveProxyHelper::StartPendingRequest() {
|
|||
receiver_.set_disconnect_handler(
|
||||
base::BindOnce(&ResolveProxyHelper::OnProxyLookupComplete,
|
||||
base::Unretained(this), net::ERR_ABORTED, base::nullopt));
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_)
|
||||
browser_context_->GetDefaultStoragePartition()
|
||||
->GetNetworkContext()
|
||||
->LookUpProxyForURL(pending_requests_.front().url,
|
||||
net::NetworkIsolationKey::Todo(),
|
||||
|
|
|
@ -700,8 +700,9 @@ void InspectableWebContents::LoadNetworkResource(DispatchCallback callback,
|
|||
std::make_unique<network::WrapperPendingSharedURLLoaderFactory>(
|
||||
std::move(pending_remote)));
|
||||
} else {
|
||||
auto* partition = content::BrowserContext::GetDefaultStoragePartition(
|
||||
GetDevToolsWebContents()->GetBrowserContext());
|
||||
auto* partition = GetDevToolsWebContents()
|
||||
->GetBrowserContext()
|
||||
->GetDefaultStoragePartition();
|
||||
url_loader_factory = partition->GetURLLoaderFactoryForBrowserProcess();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue