chore: bump chromium to 102.0.4961.0 (main) (#33091)

* chore: bump chromium in DEPS to 101.0.4911.0

* chore: bump chromium in DEPS to 101.0.4913.0

* chore: bump chromium in DEPS to 101.0.4915.0

* chore: bump chromium in DEPS to 101.0.4917.0

* chore: bump chromium in DEPS to 101.0.4919.0

* chore: bump chromium in DEPS to 101.0.4921.0

* chore: bump chromium in DEPS to 101.0.4923.0

* chore: bump chromium in DEPS to 101.0.4925.0

* chore: bump chromium in DEPS to 101.0.4927.0

* chore: bump chromium in DEPS to 101.0.4929.0

* chore: update patches

* chore: bump chromium in DEPS to 101.0.4931.0

* chore: update patches

* 3475388: Remove mojo::InterfacePtr<T> and mojo::InterfacePtrInfo<T>

Ref: 3475388

Actual fixes in 1824792: Migrate DisplayClient to the new Mojo types | 1824792

* 3503874: Remove base::size(), base::empty(), and base::data().

Ref: 3503874

* chore: reconcile patches with main rebase

* chore: bump chromium in DEPS to 101.0.4933.0

* chore: update patches

* 3329593: [Fenced Frame] Ensure to support external protocols in a fenced frame

Ref: 3329593

* 3503874: Remove base::size(), base::empty(), and base::data().

Ref: 3503874

* 3446451: Use forward decl of ImageSkiaRep in //ui/gfx/image/image_skia.h

Ref: 3446451

* 3499818: partition_alloc: Rename AllocFlags to AllocWithFlags

Ref: 3499818

* chore: bump chromium in DEPS to 101.0.4935.0

* chore: update patches

* 3463286: partition_alloc: Move PartitionAlloc into the own namespaces (15 of N)

Ref: 3463286

* 3506590: Reland "Support ChromeOS external protocol dialog for Fenced Frame navigations"

Ref: 3506590

* 3475388: Remove mojo::InterfacePtr<T> and mojo::InterfacePtrInfo<T>

Ref: 3475388

Actual fixes in 1880987: Convert URLLoaderReqeust from //content to new Mojo types | 1880987 The change in the roll started causing the legacy types to fail

* chore: missing SkRegion include

* 3499600: Introduce blink::WebCssOrigin

Ref: 3499600

* fixup!: 3503874: Remove base::size(), base::empty(), and base::data().

Ref: 3503874

* chore: bump chromium in DEPS to 101.0.4937.0

* chore: update patches

* 3500826: [locales] Refactor locales for ios

Ref: 3500826

* 3509531: Make some public Blink media files private

Ref: 3509531

* 3497377: bluetooth: Add BluetoothDevice.forget()

Ref: 3497377

* chore: bump chromium in DEPS to 101.0.4939.0

* chore: bump chromium in DEPS to 101.0.4941.0

* 3514804: Deprecate all existing uses of mojo_base.mojom.{Dictionary,List}Value.

Ref: 3514804

* 3502592: Delete PPAPI init/shutdown code in //pdf.

Ref: 3502592

* chore: update patches

* fixup! 3502592: Delete PPAPI init/shutdown code in //pdf.

* chore: bump chromium in DEPS to 101.0.4943.0

* chore: fix lint, remove unneeded headers

* fixup! 3475388: Remove mojo::InterfacePtr<T> and mojo::InterfacePtrInfo<T>

* update mojo calls in offscreen patch

* update hunspell filenames

* chore: bump chromium in DEPS to 101.0.4945.0

* chore: update patches

* fix offscreen patch again

* chore: bump chromium in DEPS to 101.0.4947.0

* chore: update patches

* chore: bump chromium in DEPS to 101.0.4949.0

* support unseasoned pdf

* update patches

* chore: update patches

* chore: [IWYU] include missing skia headers

* chore: bump chromium in DEPS to 101.0.4951.0

* chore: update patches

* 3457645: media: Remove IsKeySystemsUpdateNeeded()

3457645

* chore: bump chromium in DEPS to 102.0.4952.2

* chore: update patches

* 3488672: Add documentId as a parameter in tabs.connect() and tabs.sendMessage().

Ref: 3488672

* 3508375: Fix an issue dangerous dialog is not shown for some apk download

Ref: 3508375

* chore: bump chromium in DEPS to 102.0.4953.0

* chore: update patches

* 3510189: Harden up drag and drop support across same-process boundaries.

Ref: 3510189

* 3526815: Remove hardcoded colors from chrome/browser/ui/views/overlay/.

Ref: 3526815

* chore: bump chromium in DEPS to 102.0.4955.0

* build: add af and ur locale to manifests

3498914 [locales] Add af and ur to desktop

Ref: 3498914

* fixup! build: add af and ur locale to manifests

* chore: bump chromium in DEPS to 102.0.4957.0

* 3529090: gin: set JS flags before v8 initialization

Xref: 3529090

chore: fix code shear in chromium/gin_enable_disable_v8_platform.patch

* chore: update patches

* 3536433: [network] Rename data_path and http_cache_path from _path to _directory.

Xref: 3536433

* 3111565: Relocated Page.printToPDF implementation to //components

Xref: 3111565

refactor: inject E args to PrintRequestedPages() and ScriptedPrintCallback

TODO: currently passes a placeholder for job_settings. We have other
code paths that inject settings from electron_api_web_contents.cc.
Should those be injected here as well? (CC @codebytere)

* fixup! 3111565: Relocated Page.printToPDF implementation to //components

* fixup! 3111565: Relocated Page.printToPDF implementation to //components

* 3520025: Make "libcxx_abi_unstable" not a gn arg

Xref: 3520025

build: since it is no longer a gn arg, patch it in

* chore: change usages of std::vector with const elements (#33373)

* chore: bump chromium in DEPS to 102.0.4959.0

* chore: update patches

* build: iwyu base/threading/platform_thread.h

* 3525774: Add GPSForCurrentDocument() into PermissionControllerDelegate.

Xref: 3525774

refactor: copy upstream impl of GetPermissionStatusForCurrentDocument into +ElectronPermissionManager

* use gclient_gn_args_from instead of hand-copying

* checkout mac on mac

* chore: update patches

* Revert "checkout mac on mac"

This reverts commit fe9ccf49ec6139868ccf2272c2016cefa3f32769.

* fixup! 3525774: Add GPSForCurrentDocument() into PermissionControllerDelegate.

* fixup! 3457645: media: Remove IsKeySystemsUpdateNeeded()

add nogncheck

* fix: set .eslintrc.json to root to avoid cascade to chromium eslintrc

* Xref: 6dfdf79b8c

Xref: https://reviews.llvm.org/D101458

Upstream added a CMakeLists.txt in an include dir ¯\_(ツ)_/¯ and
so it must be enumerated in filenames.libcxxabi.gni

* 3511268: Remove unused headers from cxx17_backports.h

3511268

use std::size instead of base::size

* iwyu: SkPaint

3488428: [includes] Fix transitive includes of SkImageEncoder

* chore: [IWYU] include missing skia headers

* fixup! 3511268: Remove unused headers from cxx17_backports.h

* chore: bump chromium in DEPS to 102.0.4961.0

* chore: update patches

* fixup! 3475388: Remove mojo::InterfacePtr<T> and mojo::InterfacePtrInfo<T>

chore: remove unused #include

* fixup! 3510189: Harden up drag and drop support across same-process boundaries. | 3510189

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
This commit is contained in:
electron-roller[bot] 2022-03-24 21:39:03 -04:00 committed by GitHub
parent 92c5dedc76
commit 7e59d784a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
142 changed files with 998 additions and 754 deletions

View file

@ -91,6 +91,12 @@ bool ElectronBluetoothDelegate::HasDevicePermission(
return true;
}
void ElectronBluetoothDelegate::RevokeDevicePermissionWebInitiated(
RenderFrameHost* frame,
const WebBluetoothDeviceId& device_id) {
NOTIMPLEMENTED();
}
bool ElectronBluetoothDelegate::IsAllowedToAccessService(
RenderFrameHost* frame,
const WebBluetoothDeviceId& device_id,

View file

@ -71,6 +71,9 @@ class ElectronBluetoothDelegate : public content::BluetoothDelegate {
bool HasDevicePermission(
content::RenderFrameHost* frame,
const blink::WebBluetoothDeviceId& device_id) override;
void RevokeDevicePermissionWebInitiated(
content::RenderFrameHost* frame,
const blink::WebBluetoothDeviceId& device_id) override;
bool IsAllowedToAccessService(content::RenderFrameHost* frame,
const blink::WebBluetoothDeviceId& device_id,
const device::BluetoothUUID& service) override;

View file

@ -40,7 +40,9 @@
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/skia_util.h"
#include "skia/ext/legacy_display_globals.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkFont.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/events/keycodes/keyboard_code_conversion_win.h"
#include "ui/strings/grit/ui_strings.h"
@ -97,7 +99,7 @@ std::wstring GetAppInfoHelperForProtocol(ASSOCSTR assoc_str, const GURL& url) {
return std::wstring();
wchar_t out_buffer[1024];
DWORD buffer_size = base::size(out_buffer);
DWORD buffer_size = std::size(out_buffer);
HRESULT hr =
AssocQueryString(ASSOCF_IS_PROTOCOL, assoc_str, url_scheme.c_str(), NULL,
out_buffer, &buffer_size);

View file

@ -27,11 +27,16 @@
#include "base/strings/utf_string_conversions.h"
#include "base/task/post_task.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/pdf/chrome_pdf_stream_delegate.h"
#include "chrome/browser/plugins/pdf_iframe_navigation_throttle.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version.h"
#include "components/net_log/chrome_net_log.h"
#include "components/network_hints/common/network_hints.mojom.h"
#include "components/pdf/browser/pdf_navigation_throttle.h"
#include "components/pdf/browser/pdf_url_loader_request_interceptor.h"
#include "components/pdf/common/internal_plugin_helpers.h"
#include "content/browser/keyboard_lock/keyboard_lock_service_impl.h" // nogncheck
#include "content/browser/site_instance_impl.h" // nogncheck
#include "content/public/browser/browser_main_runner.h"
@ -620,7 +625,7 @@ void ElectronBrowserClient::AppendExtraCommandLineSwitches(
switches::kServiceWorkerSchemes, switches::kStreamingSchemes};
command_line->CopySwitchesFrom(*base::CommandLine::ForCurrentProcess(),
kCommonSwitchNames,
base::size(kCommonSwitchNames));
std::size(kCommonSwitchNames));
if (process_type == ::switches::kUtilityProcess ||
content::RenderProcessHost::FromID(process_id)) {
MaybeAppendSecureOriginsAllowlistSwitch(command_line);
@ -1042,10 +1047,10 @@ void HandleExternalProtocolInUI(
bool ElectronBrowserClient::HandleExternalProtocol(
const GURL& url,
content::WebContents::Getter web_contents_getter,
int child_id,
int frame_tree_node_id,
content::NavigationUIData* navigation_data,
bool is_main_frame,
bool is_primary_main_frame,
bool is_in_fenced_frame_tree,
network::mojom::WebSandboxFlags sandbox_flags,
ui::PageTransition page_transition,
bool has_user_gesture,
@ -1070,6 +1075,18 @@ ElectronBrowserClient::CreateThrottlesForNavigation(
std::make_unique<extensions::ExtensionNavigationThrottle>(handle));
#endif
#if BUILDFLAG(ENABLE_PDF_VIEWER)
std::unique_ptr<content::NavigationThrottle> pdf_iframe_throttle =
PDFIFrameNavigationThrottle::MaybeCreateThrottleFor(handle);
if (pdf_iframe_throttle)
throttles.push_back(std::move(pdf_iframe_throttle));
std::unique_ptr<content::NavigationThrottle> pdf_throttle =
pdf::PdfNavigationThrottle::MaybeCreateThrottleFor(
handle, std::make_unique<ChromePdfStreamDelegate>());
if (pdf_throttle)
throttles.push_back(std::move(pdf_throttle));
#endif
return throttles;
}
@ -1474,6 +1491,26 @@ bool ElectronBrowserClient::WillCreateURLLoaderFactory(
return true;
}
std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>>
ElectronBrowserClient::WillCreateURLLoaderRequestInterceptors(
content::NavigationUIData* navigation_ui_data,
int frame_tree_node_id,
const scoped_refptr<network::SharedURLLoaderFactory>&
network_loader_factory) {
std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>>
interceptors;
#if BUILDFLAG(ENABLE_PDF_VIEWER)
{
std::unique_ptr<content::URLLoaderRequestInterceptor> pdf_interceptor =
pdf::PdfURLLoaderRequestInterceptor::MaybeCreateInterceptor(
frame_tree_node_id, std::make_unique<ChromePdfStreamDelegate>());
if (pdf_interceptor)
interceptors.push_back(std::move(pdf_interceptor));
}
#endif
return interceptors;
}
void ElectronBrowserClient::OverrideURLLoaderFactoryParams(
content::BrowserContext* browser_context,
const url::Origin& origin,
@ -1747,6 +1784,9 @@ ElectronBrowserClient::GetPluginMimeTypesWithExternalHandlers(
auto map = PluginUtils::GetMimeTypeToExtensionIdMap(browser_context);
for (const auto& pair : map)
mime_types.insert(pair.first);
#endif
#if BUILDFLAG(ENABLE_PDF_VIEWER)
mime_types.insert(pdf::kInternalPluginMimeType);
#endif
return mime_types;
}

View file

@ -227,6 +227,12 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
bool* bypass_redirect_checks,
bool* disable_secure_dns,
network::mojom::URLLoaderFactoryOverridePtr* factory_override) override;
std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>>
WillCreateURLLoaderRequestInterceptors(
content::NavigationUIData* navigation_ui_data,
int frame_tree_node_id,
const scoped_refptr<network::SharedURLLoaderFactory>&
network_loader_factory) override;
bool ShouldTreatURLSchemeAsFirstPartyWhenTopLevel(
base::StringPiece scheme,
bool is_embedded_origin_secure) override;
@ -247,10 +253,10 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
bool HandleExternalProtocol(
const GURL& url,
content::WebContents::Getter web_contents_getter,
int child_id,
int frame_tree_node_id,
content::NavigationUIData* navigation_data,
bool is_main_frame,
bool is_primary_main_frame,
bool is_in_fenced_frame_tree,
network::mojom::WebSandboxFlags sandbox_flags,
ui::PageTransition page_transition,
bool has_user_gesture,

View file

@ -16,6 +16,7 @@
#include "base/debug/leak_annotations.h"
#include "base/posix/eintr_wrapper.h"
#include "base/task/post_task.h"
#include "base/threading/platform_thread.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "shell/browser/browser.h"

View file

@ -141,11 +141,11 @@ void ElectronDownloadManagerDelegate::OnDownloadPathGenerated(
std::ignore = dialog_promise.Then(std::move(dialog_callback));
file_dialog::ShowSaveDialog(settings, std::move(dialog_promise));
} else {
std::move(callback).Run(path,
download::DownloadItem::TARGET_DISPOSITION_PROMPT,
download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
item->GetMixedContentStatus(), path, absl::nullopt,
download::DOWNLOAD_INTERRUPT_REASON_NONE);
std::move(callback).Run(
path, download::DownloadItem::TARGET_DISPOSITION_PROMPT,
download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
item->GetMixedContentStatus(), path, base::FilePath(), absl::nullopt,
download::DOWNLOAD_INTERRUPT_REASON_NONE);
}
}
@ -184,7 +184,7 @@ void ElectronDownloadManagerDelegate::OnDownloadSaveDialogDone(
std::move(download_callback)
.Run(path, download::DownloadItem::TARGET_DISPOSITION_PROMPT,
download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
item->GetMixedContentStatus(), path, absl::nullopt,
item->GetMixedContentStatus(), path, base::FilePath(), absl::nullopt,
interrupt_reason);
}
@ -204,7 +204,7 @@ bool ElectronDownloadManagerDelegate::DetermineDownloadTarget(
download::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
download::DownloadItem::MixedContentStatus::UNKNOWN,
download->GetForcedFilePath(), absl::nullopt,
download->GetForcedFilePath(), base::FilePath(), absl::nullopt,
download::DOWNLOAD_INTERRUPT_REASON_NONE);
return true;
}
@ -217,7 +217,8 @@ bool ElectronDownloadManagerDelegate::DetermineDownloadTarget(
save_path, download::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
download::DownloadItem::MixedContentStatus::UNKNOWN, save_path,
absl::nullopt, download::DOWNLOAD_INTERRUPT_REASON_NONE);
base::FilePath(), absl::nullopt,
download::DOWNLOAD_INTERRUPT_REASON_NONE);
return true;
}

View file

@ -9,6 +9,7 @@
#include <vector>
#include "base/values.h"
#include "content/browser/permissions/permission_util.h" // nogncheck
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/global_routing_id.h"
#include "content/public/browser/permission_controller.h"
@ -398,4 +399,13 @@ ElectronPermissionManager::GetPermissionStatusForFrame(
: blink::mojom::PermissionStatus::DENIED;
}
blink::mojom::PermissionStatus
ElectronPermissionManager::GetPermissionStatusForCurrentDocument(
content::PermissionType permission,
content::RenderFrameHost* render_frame_host) {
return GetPermissionStatus(
permission, render_frame_host->GetLastCommittedOrigin().GetURL(),
content::PermissionUtil::GetLastCommittedOriginAsURL(render_frame_host));
}
} // namespace electron

View file

@ -85,6 +85,9 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate {
content::PermissionType permission,
content::RenderFrameHost* render_frame_host,
const GURL& requesting_origin) override;
blink::mojom::PermissionStatus GetPermissionStatusForCurrentDocument(
content::PermissionType permission,
content::RenderFrameHost* render_frame_host) override;
bool CheckPermissionWithDetails(content::PermissionType permission,
content::RenderFrameHost* render_frame_host,

View file

@ -40,7 +40,7 @@ ElectronExtensionMessageFilter::ElectronExtensionMessageFilter(
int render_process_id,
content::BrowserContext* browser_context)
: BrowserMessageFilter(kExtensionFilteredMessageClasses,
base::size(kExtensionFilteredMessageClasses)),
std::size(kExtensionFilteredMessageClasses)),
render_process_id_(render_process_id),
browser_context_(browser_context) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);

View file

@ -75,13 +75,40 @@ std::unique_ptr<MessagePort> ElectronMessagingDelegate::CreateReceiverForTab(
const std::string& extension_id,
const PortId& receiver_port_id,
content::WebContents* receiver_contents,
int receiver_frame_id) {
int receiver_frame_id,
const std::string& receiver_document_id) {
// Frame ID -1 is every frame in the tab.
bool include_child_frames = receiver_frame_id == -1;
content::RenderFrameHost* receiver_rfh =
include_child_frames ? receiver_contents->GetMainFrame()
: ExtensionApiFrameIdMap::GetRenderFrameHostById(
receiver_contents, receiver_frame_id);
bool include_child_frames =
receiver_frame_id == -1 && receiver_document_id.empty();
content::RenderFrameHost* receiver_rfh = nullptr;
if (include_child_frames) {
// The target is the active outermost main frame of the WebContents.
receiver_rfh = receiver_contents->GetMainFrame();
} else if (!receiver_document_id.empty()) {
ExtensionApiFrameIdMap::DocumentId document_id =
ExtensionApiFrameIdMap::DocumentIdFromString(receiver_document_id);
// Return early for invalid documentIds.
if (!document_id)
return nullptr;
receiver_rfh =
ExtensionApiFrameIdMap::Get()->GetRenderFrameHostByDocumentId(
document_id);
// If both |document_id| and |receiver_frame_id| are provided they
// should find the same RenderFrameHost, if not return early.
if (receiver_frame_id != -1 &&
ExtensionApiFrameIdMap::GetRenderFrameHostById(
receiver_contents, receiver_frame_id) != receiver_rfh) {
return nullptr;
}
} else {
DCHECK_GT(receiver_frame_id, -1);
receiver_rfh = ExtensionApiFrameIdMap::GetRenderFrameHostById(
receiver_contents, receiver_frame_id);
}
if (!receiver_rfh)
return nullptr;

View file

@ -37,7 +37,8 @@ class ElectronMessagingDelegate : public MessagingDelegate {
const std::string& extension_id,
const PortId& receiver_port_id,
content::WebContents* receiver_contents,
int receiver_frame_id) override;
int receiver_frame_id,
const std::string& receiver_document_id) override;
std::unique_ptr<MessagePort> CreateReceiverForNativeApp(
content::BrowserContext* browser_context,
base::WeakPtr<MessagePort::ChannelDelegate> channel_delegate,

View file

@ -103,7 +103,7 @@ const FontDefault kFontDefaults[] = {
IDS_FIXED_FONT_FAMILY_TRADITIONAL_HAN},
#endif
};
const size_t kFontDefaultsLength = base::size(kFontDefaults);
const size_t kFontDefaultsLength = std::size(kFontDefaults);
// ^^^^^ DO NOT EDIT ^^^^^

View file

@ -107,7 +107,7 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
private:
static void* AllocateMemoryOrNull(size_t size, InitializationPolicy policy) {
return AllocateMemoryWithFlags(size, policy,
base::PartitionAllocReturnNull);
partition_alloc::AllocFlags::kReturnNull);
}
static void* AllocateMemoryWithFlags(size_t size,
@ -131,9 +131,9 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
}
if (policy == kZeroInitialize) {
flags |= base::PartitionAllocZeroFill;
flags |= partition_alloc::AllocFlags::kZeroFill;
}
void* data = allocator_->root()->AllocFlags(flags, size, "Electron");
void* data = allocator_->root()->AllocWithFlags(flags, size, "Electron");
if (base::kAlignment < 16) {
char* ptr = reinterpret_cast<char*>(data);
DCHECK_EQ(base::bits::AlignUp(ptr, 16), ptr)

View file

@ -13,6 +13,7 @@
#include <vector>
#include "shell/common/api/api.mojom.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/views/widget/widget_observer.h"
#if BUILDFLAG(IS_WIN)

View file

@ -63,7 +63,7 @@ class AsarURLLoader : public network::mojom::URLLoader {
public:
static void CreateAndStart(
const network::ResourceRequest& request,
network::mojom::URLLoaderRequest loader,
mojo::PendingReceiver<network::mojom::URLLoader> loader,
mojo::PendingRemote<network::mojom::URLLoaderClient> client,
scoped_refptr<net::HttpResponseHeaders> extra_response_headers) {
// Owns itself. Will live as long as its URLLoader and URLLoaderClientPtr
@ -390,7 +390,7 @@ class AsarURLLoader : public network::mojom::URLLoader {
void CreateAsarURLLoader(
const network::ResourceRequest& request,
network::mojom::URLLoaderRequest loader,
mojo::PendingReceiver<network::mojom::URLLoader> loader,
mojo::PendingRemote<network::mojom::URLLoaderClient> client,
scoped_refptr<net::HttpResponseHeaders> extra_response_headers) {
auto task_runner = base::ThreadPool::CreateSequencedTaskRunner(

View file

@ -13,7 +13,7 @@ namespace asar {
void CreateAsarURLLoader(
const network::ResourceRequest& request,
network::mojom::URLLoaderRequest loader,
mojo::PendingReceiver<network::mojom::URLLoader> loader,
mojo::PendingRemote<network::mojom::URLLoaderClient> client,
scoped_refptr<net::HttpResponseHeaders> extra_response_headers);

View file

@ -80,14 +80,14 @@ void NetworkContextService::ConfigureNetworkContextParams(
// Configure on-disk storage for persistent sessions.
if (!in_memory) {
// Configure the HTTP cache path and size.
network_context_params->http_cache_path =
network_context_params->http_cache_directory =
path.Append(chrome::kCacheDirname);
network_context_params->http_cache_max_size =
browser_context_->GetMaxCacheSize();
network_context_params->file_paths =
network::mojom::NetworkContextFilePaths::New();
network_context_params->file_paths->data_path =
network_context_params->file_paths->data_directory =
path.Append(chrome::kNetworkDataDirname);
network_context_params->file_paths->unsandboxed_data_path = path;
network_context_params->file_paths->trigger_migration =

View file

@ -523,8 +523,9 @@ void ProxyingURLLoaderFactory::InProgressRequest::ContinueToStartRequest(
if (has_any_extra_headers_listeners_)
options |= network::mojom::kURLLoadOptionUseHeaderClient;
factory_->target_factory_->CreateLoaderAndStart(
mojo::MakeRequest(&target_loader_), network_service_request_id_,
options, request_, proxied_client_receiver_.BindNewPipeAndPassRemote(),
target_loader_.BindNewPipeAndPassReceiver(),
network_service_request_id_, options, request_,
proxied_client_receiver_.BindNewPipeAndPassRemote(),
traffic_annotation_);
}
@ -760,7 +761,7 @@ ProxyingURLLoaderFactory::ProxyingURLLoaderFactory(
uint64_t* request_id_generator,
std::unique_ptr<extensions::ExtensionNavigationUIData> navigation_ui_data,
absl::optional<int64_t> navigation_id,
network::mojom::URLLoaderFactoryRequest loader_request,
mojo::PendingReceiver<network::mojom::URLLoaderFactory> loader_request,
mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory_remote,
mojo::PendingReceiver<network::mojom::TrustedURLLoaderHeaderClient>
header_client_receiver,

View file

@ -28,6 +28,7 @@
#include "services/network/public/mojom/url_loader.mojom.h"
#include "services/network/public/mojom/url_loader_factory.mojom.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "services/network/url_loader_factory.h"
#include "shell/browser/net/electron_url_loader_factory.h"
#include "shell/browser/net/web_request_api_interface.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
@ -146,7 +147,7 @@ class ProxyingURLLoaderFactory
mojo::Receiver<network::mojom::URLLoaderClient> proxied_client_receiver_{
this};
network::mojom::URLLoaderPtr target_loader_;
mojo::Remote<network::mojom::URLLoader> target_loader_;
network::mojom::URLResponseHeadPtr current_response_;
mojo::ScopedDataPipeConsumerHandle current_body_;
@ -198,7 +199,7 @@ class ProxyingURLLoaderFactory
uint64_t* request_id_generator,
std::unique_ptr<extensions::ExtensionNavigationUIData> navigation_ui_data,
absl::optional<int64_t> navigation_id,
network::mojom::URLLoaderFactoryRequest loader_request,
mojo::PendingReceiver<network::mojom::URLLoaderFactory> loader_request,
mojo::PendingRemote<network::mojom::URLLoaderFactory>
target_factory_remote,
mojo::PendingReceiver<network::mojom::TrustedURLLoaderHeaderClient>

View file

@ -12,6 +12,7 @@
#include "base/scoped_observation.h"
#include "shell/browser/native_window_views.h"
#include "shell/browser/ui/views/client_frame_view_linux.h"
#include "third_party/skia/include/core/SkRRect.h"
#include "ui/native_theme/native_theme_observer.h"
#include "ui/views/linux_ui/device_scale_factor_observer.h"
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h"

View file

@ -206,7 +206,7 @@ bool ShowOpenDialogSync(const DialogSettings& settings,
wchar_t file_name[MAX_PATH];
hr = GetFileNameFromShellItem(item, SIGDN_FILESYSPATH, file_name,
base::size(file_name));
std::size(file_name));
if (FAILED(hr))
return false;

View file

@ -11,6 +11,7 @@
#include "base/files/file_path.h"
#include "base/memory/weak_ptr.h"
#include "base/nix/xdg_util.h"
#include "third_party/skia/include/core/SkImage.h"
#include "ui/base/glib/glib_signal.h"
#include "ui/views/linux_ui/status_icon_linux.h"

View file

@ -142,7 +142,7 @@ void SetZoomLevelForWebContents(content::WebContents* web_contents,
double GetNextZoomLevel(double level, bool out) {
double factor = blink::PageZoomLevelToZoomFactor(level);
size_t size = base::size(kPresetZoomFactors);
size_t size = std::size(kPresetZoomFactors);
for (size_t i = 0; i < size; ++i) {
if (!blink::PageZoomValuesEqual(kPresetZoomFactors[i], factor))
continue;

View file

@ -93,7 +93,7 @@ bool ConvertShellLinkToJumpListItem(IShellLink* shell_link,
item->type = JumpListItem::Type::kTask;
wchar_t path[MAX_PATH];
if (FAILED(shell_link->GetPath(path, base::size(path), nullptr, 0)))
if (FAILED(shell_link->GetPath(path, std::size(path), nullptr, 0)))
return false;
item->path = base::FilePath(path);
@ -111,18 +111,18 @@ bool ConvertShellLinkToJumpListItem(IShellLink* shell_link,
item->title = prop.get().pwszVal;
}
if (SUCCEEDED(shell_link->GetWorkingDirectory(path, base::size(path))))
if (SUCCEEDED(shell_link->GetWorkingDirectory(path, std::size(path))))
item->working_dir = base::FilePath(path);
int icon_index;
if (SUCCEEDED(
shell_link->GetIconLocation(path, base::size(path), &icon_index))) {
shell_link->GetIconLocation(path, std::size(path), &icon_index))) {
item->icon_path = base::FilePath(path);
item->icon_index = icon_index;
}
wchar_t item_desc[INFOTIPSIZE];
if (SUCCEEDED(shell_link->GetDescription(item_desc, base::size(item_desc))))
if (SUCCEEDED(shell_link->GetDescription(item_desc, std::size(item_desc))))
item->description = item_desc;
return true;