chore: bump chromium to 93.0.4530.0 (master) (#29256)

* chore: bump chromium in DEPS to 92.0.4512.6

* 2887336: [CaptureHandle][#2] Propagate CaptureHandleConfig in browser process

2887336

* refactor: base::Optional -> absl::optional

* chore: fixup patch indices

* chore: bump chromium in DEPS to 92.0.4514.0

* 2899417: Make build work when enable_pdf is set to false.

2899417

* 2904731: use BrowserContext instead of Profile in PreconnectManager

2904731

* 2295749: fix: check IsSecureEventInputEnabled in constructor before setting SetPasswordInputEnabled to true

2295749

* 2893803: Add a GetWebView to RenderFrame.

2893803

* 2892345: Implement WebContents::ForEachRenderFrameHost

2892345

* chore: fixup patch indices

* 2892048: Real instance methods for BrowserContext: remaining 5 methods.

2892048

* 2902821: [mojo] Don't require full header includes for referenced interfaces

2902821

* 2496500: Remove last deprecated extension Event ctor.

2496500

* chore: fixup malformed pepper support patch

* chore: bump chromium in DEPS to 92.0.4515.0

* 2908461: Add CreateEmptyPrintPagesParamsPtr() inside print_view_manager_base.cc.

2908461

* 2880838: viz: add optional HDRMetadata to TransferableResource

2880838

* chore: fixup patch indices

* chore: bump chromium in DEPS to 92.0.4515.5

* chore: update patches

* chore: bump chromium in DEPS to 92.0.4515.7

* chore: bump chromium in DEPS to 92.0.4515.9

* chore: bump chromium in DEPS to 93.0.4522.0

* chore: bump chromium in DEPS to 93.0.4523.0

* chore: bump chromium in DEPS to 93.0.4524.0

* chore: update patches

* chore: enable_pak_file_integrity_checks was reverted

* chore: update patches

* refactor: base/optional was replaced with absl::optional

Refs: 2910202

* refactor: replace all usages of base::nullopt with absl::nullopt

Refs: 2910202

* chore: add missing base::Contains include

Refs: 2910202

* refactor: replace all usages of base::make_optional with
absl::make_optional

Refs: 2910202

* refactor: replace WorldScriptContext() with GetScriptContextFromWorldId

Refs: 2893213

* chore: clean up left over opening namespace

Refs: 95bfe6d08f

* chore: add missing base::Contains include

Refs: 2910202

* refactor: replace GetCurrentDisplayIterator with the hard checker
GetCurrentDisplay

This code looks suspicious but if the iterator was invalid before it
will also be invalid now.

Refs: 2893191

* refactor: headers are now passed directly in extensions client

Refs: 2918906

* refactor: base::DictionaryValue::empty() has been removed

Refs: 2912424

* chore: add missing includes for network URLLoaderFactory

Refs: unknown, probably a side effect of header changes

* refactor: make convenience wrapper around AppendArg

There is no converter FromV8 for base::StringPiece (apparently its not
possible).  So we now take in an std::string and use the construct for
StringPiece to do implicit conversion.

Refs: 2905544

* chore: add patch

* chore: bump chromium in DEPS to 93.0.4525.0

* chore: update patches

* refactor: CanResize has been de-virtualized

Refs: 2485774

* chore: update resource integrity patch

* chore: add character encoding idl patch

* chore: bump chromium in DEPS to 93.0.4526.0

* chore: update patches

* chore: bump chromium in DEPS to 93.0.4527.0

* chore: bump chromium in DEPS to 93.0.4528.0

* chore: update patches

* chore: update idl encoding patch

* chore: bump chromium in DEPS to 93.0.4529.0

* chore: update patches

* chore: bump chromium in DEPS to 93.0.4530.0

* chore: update patches

* fix: only SetCanResize after the widget has been initialized

* chore: add patch for vr on windows gn gen

* spec: fix focus related tests on linux due to delay in focus swap

* chore: remove new usages of base::Optional from main

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
This commit is contained in:
electron-roller[bot] 2021-06-03 01:05:04 -07:00 committed by GitHub
parent 8d0ed05c99
commit 8532e1239e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
165 changed files with 720 additions and 1048 deletions

View file

@ -14,7 +14,6 @@
#include "base/environment.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/optional.h"
#include "base/path_service.h"
#include "base/system/sys_info.h"
#include "chrome/browser/browser_process.h"
@ -57,6 +56,7 @@
#include "shell/common/node_includes.h"
#include "shell/common/options_switches.h"
#include "shell/common/platform_util.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "ui/gfx/image/image.h"
#if defined(OS_WIN)
@ -912,7 +912,7 @@ void App::SetAppPath(const base::FilePath& app_path) {
#if !defined(OS_MAC)
void App::SetAppLogsPath(gin_helper::ErrorThrower thrower,
base::Optional<base::FilePath> custom_path) {
absl::optional<base::FilePath> custom_path) {
if (custom_path.has_value()) {
if (!custom_path->IsAbsolute()) {
thrower.ThrowError("Path must be absolute");
@ -965,7 +965,7 @@ base::FilePath App::GetPath(gin_helper::ErrorThrower thrower,
// If users try to get the logs path before setting a logs path,
// set the path to a sensible default and then try to get it again
if (!succeed && name == "logs") {
SetAppLogsPath(thrower, base::Optional<base::FilePath>());
SetAppLogsPath(thrower, absl::optional<base::FilePath>());
succeed = base::PathService::Get(key, &path);
}

View file

@ -175,7 +175,7 @@ class App : public ElectronBrowserClient::Delegate,
void ChildProcessDisconnected(int pid);
void SetAppLogsPath(gin_helper::ErrorThrower thrower,
base::Optional<base::FilePath> custom_path);
absl::optional<base::FilePath> custom_path);
// Get/Set the pre-defined path in PathService.
base::FilePath GetPath(gin_helper::ErrorThrower thrower,

View file

@ -18,7 +18,7 @@ namespace electron {
namespace api {
void App::SetAppLogsPath(gin_helper::ErrorThrower thrower,
base::Optional<base::FilePath> custom_path) {
absl::optional<base::FilePath> custom_path) {
if (custom_path.has_value()) {
if (!custom_path->IsAbsolute()) {
thrower.ThrowError("Path must be absolute");

View file

@ -893,7 +893,7 @@ bool BaseWindow::GetWindowButtonVisibility() const {
void BaseWindow::SetTrafficLightPosition(const gfx::Point& position) {
// For backward compatibility we treat (0, 0) as resetting to default.
if (position.IsOrigin())
window_->SetTrafficLightPosition(base::nullopt);
window_->SetTrafficLightPosition(absl::nullopt);
else
window_->SetTrafficLightPosition(position);
}

View file

@ -7,7 +7,6 @@
#include <utility>
#include "base/files/file_util.h"
#include "base/optional.h"
#include "base/task/thread_pool.h"
#include "base/threading/thread_restrictions.h"
#include "base/trace_event/trace_config.h"
@ -18,6 +17,7 @@
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/gin_helper/promise.h"
#include "shell/common/node_includes.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
using content::TracingController;
@ -58,18 +58,18 @@ namespace {
using CompletionCallback = base::OnceCallback<void(const base::FilePath&)>;
base::Optional<base::FilePath> CreateTemporaryFileOnIO() {
absl::optional<base::FilePath> CreateTemporaryFileOnIO() {
base::FilePath temp_file_path;
if (!base::CreateTemporaryFile(&temp_file_path))
return base::nullopt;
return base::make_optional(std::move(temp_file_path));
return absl::nullopt;
return absl::make_optional(std::move(temp_file_path));
}
void StopTracing(gin_helper::Promise<base::FilePath> promise,
base::Optional<base::FilePath> file_path) {
absl::optional<base::FilePath> file_path) {
auto resolve_or_reject = base::AdaptCallbackForRepeating(base::BindOnce(
[](gin_helper::Promise<base::FilePath> promise,
const base::FilePath& path, base::Optional<std::string> error) {
const base::FilePath& path, absl::optional<std::string> error) {
if (error) {
promise.RejectWithErrorMessage(error.value());
} else {
@ -79,14 +79,14 @@ void StopTracing(gin_helper::Promise<base::FilePath> promise,
std::move(promise), *file_path));
if (file_path) {
auto endpoint = TracingController::CreateFileEndpoint(
*file_path, base::BindRepeating(resolve_or_reject, base::nullopt));
*file_path, base::BindRepeating(resolve_or_reject, absl::nullopt));
if (!TracingController::GetInstance()->StopTracing(endpoint)) {
resolve_or_reject.Run(base::make_optional(
resolve_or_reject.Run(absl::make_optional(
"Failed to stop tracing (was a trace in progress?)"));
}
} else {
resolve_or_reject.Run(
base::make_optional("Failed to create temporary file for trace data"));
absl::make_optional("Failed to create temporary file for trace data"));
}
}
@ -96,7 +96,7 @@ v8::Local<v8::Promise> StopRecording(gin_helper::Arguments* args) {
base::FilePath path;
if (args->GetNext(&path) && !path.empty()) {
StopTracing(std::move(promise), base::make_optional(path));
StopTracing(std::move(promise), absl::make_optional(path));
} else {
// use a temporary file.
base::ThreadPool::PostTaskAndReplyWithResult(

View file

@ -131,10 +131,10 @@ bool MatchesCookie(const base::Value& filter,
if ((str = filter.FindStringKey("domain")) &&
!MatchesDomain(*str, cookie.Domain()))
return false;
base::Optional<bool> secure_filter = filter.FindBoolKey("secure");
absl::optional<bool> secure_filter = filter.FindBoolKey("secure");
if (secure_filter && *secure_filter == cookie.IsSecure())
return false;
base::Optional<bool> session_filter = filter.FindBoolKey("session");
absl::optional<bool> session_filter = filter.FindBoolKey("session");
if (session_filter && *session_filter != !cookie.IsPersistent())
return false;
return true;
@ -162,7 +162,7 @@ void FilterCookieWithStatuses(
}
// Parse dictionary property to CanonicalCookie time correctly.
base::Time ParseTimeProperty(const base::Optional<double>& value) {
base::Time ParseTimeProperty(const absl::optional<double>& value) {
if (!value) // empty time means ignoring the parameter
return base::Time();
if (*value == 0) // FromDoubleT would convert 0 to empty Time

View file

@ -165,7 +165,7 @@ v8::Local<v8::Promise> Debugger::SendCommand(gin::Arguments* args) {
pending_requests_.emplace(request_id, std::move(promise));
request.SetInteger("id", request_id);
request.SetString("method", method);
if (!command_params.empty()) {
if (!command_params.DictEmpty()) {
request.Set("params",
base::Value::ToUniquePtrValue(command_params.Clone()));
}

View file

@ -6,6 +6,7 @@
#include <vector>
#include "base/containers/contains.h"
#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
#include "gin/dictionary.h"

View file

@ -122,7 +122,7 @@ v8::Local<v8::Promise> NetLog::StartLogging(base::FilePath log_path,
}
pending_start_promise_ =
base::make_optional<gin_helper::Promise<void>>(args->isolate());
absl::make_optional<gin_helper::Promise<void>>(args->isolate());
v8::Local<v8::Promise> handle = pending_start_promise_->GetHandle();
auto command_line_string =

View file

@ -6,12 +6,12 @@
#define SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_
#include "base/callback.h"
#include "base/optional.h"
#include "base/values.h"
#include "gin/handle.h"
#include "gin/wrappable.h"
#include "services/network/public/mojom/net_log.mojom.h"
#include "shell/common/gin_helper/promise.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
namespace gin {
class Arguments;
@ -57,7 +57,7 @@ class NetLog : public gin::Wrappable<NetLog> {
network::mojom::NetLogExporterPtr net_log_exporter_;
base::Optional<gin_helper::Promise<void>> pending_start_promise_;
absl::optional<gin_helper::Promise<void>> pending_start_promise_;
scoped_refptr<base::TaskRunner> file_task_runner_;

View file

@ -264,7 +264,7 @@ void DownloadIdCallback(content::DownloadManager* download_manager,
uint32_t id) {
download_manager->CreateDownloadItem(
base::GenerateGUID(), id, path, path, url_chain, GURL(), GURL(), GURL(),
GURL(), base::nullopt, mime_type, mime_type, start_time, base::Time(),
GURL(), absl::nullopt, mime_type, mime_type, start_time, base::Time(),
etag, last_modified, offset, length, std::string(),
download::DownloadItem::INTERRUPTED,
download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,

View file

@ -64,7 +64,7 @@ gin::WrapperInfo Tray::kWrapperInfo = {gin::kEmbedderNativeGin};
Tray::Tray(v8::Isolate* isolate,
v8::Local<v8::Value> image,
base::Optional<UUID> guid)
absl::optional<UUID> guid)
: tray_icon_(TrayIcon::Create(guid)) {
SetImage(isolate, image);
tray_icon_->AddObserver(this);
@ -75,7 +75,7 @@ Tray::~Tray() = default;
// static
gin::Handle<Tray> Tray::New(gin_helper::ErrorThrower thrower,
v8::Local<v8::Value> image,
base::Optional<UUID> guid,
absl::optional<UUID> guid,
gin::Arguments* args) {
if (!Browser::Get()->is_ready()) {
thrower.ThrowError("Cannot create Tray before app is ready");
@ -226,7 +226,7 @@ void Tray::SetToolTip(const std::string& tool_tip) {
}
void Tray::SetTitle(const std::string& title,
const base::Optional<gin_helper::Dictionary>& options,
const absl::optional<gin_helper::Dictionary>& options,
gin::Arguments* args) {
if (!CheckAlive())
return;

View file

@ -44,7 +44,7 @@ class Tray : public gin::Wrappable<Tray>,
// gin_helper::Constructible
static gin::Handle<Tray> New(gin_helper::ErrorThrower thrower,
v8::Local<v8::Value> image,
base::Optional<UUID> guid,
absl::optional<UUID> guid,
gin::Arguments* args);
static v8::Local<v8::ObjectTemplate> FillObjectTemplate(
v8::Isolate*,
@ -56,7 +56,7 @@ class Tray : public gin::Wrappable<Tray>,
private:
Tray(v8::Isolate* isolate,
v8::Local<v8::Value> image,
base::Optional<UUID> guid);
absl::optional<UUID> guid);
~Tray() override;
// TrayIconObserver:
@ -87,7 +87,7 @@ class Tray : public gin::Wrappable<Tray>,
void SetPressedImage(v8::Isolate* isolate, v8::Local<v8::Value> image);
void SetToolTip(const std::string& tool_tip);
void SetTitle(const std::string& title,
const base::Optional<gin_helper::Dictionary>& options,
const absl::optional<gin_helper::Dictionary>& options,
gin::Arguments* args);
std::string GetTitle();
void SetIgnoreDoubleClickEvents(bool ignore);

View file

@ -316,7 +316,7 @@ void SimpleURLLoaderWrapper::PinBodyGetter(v8::Local<v8::Value> body_getter) {
SimpleURLLoaderWrapper::~SimpleURLLoaderWrapper() = default;
void SimpleURLLoaderWrapper::OnAuthRequired(
const base::Optional<base::UnguessableToken>& window_id,
const absl::optional<base::UnguessableToken>& window_id,
uint32_t request_id,
const GURL& url,
bool first_auth_attempt,
@ -337,7 +337,7 @@ void SimpleURLLoaderWrapper::OnAuthRequired(
gin::Arguments* args) {
std::u16string username_str, password_str;
if (!args->GetNext(&username_str) || !args->GetNext(&password_str)) {
auth_responder->OnAuthCredentials(base::nullopt);
auth_responder->OnAuthCredentials(absl::nullopt);
return;
}
auth_responder->OnAuthCredentials(

View file

@ -68,7 +68,7 @@ class SimpleURLLoaderWrapper
// network::mojom::URLLoaderNetworkServiceObserver:
void OnAuthRequired(
const base::Optional<base::UnguessableToken>& window_id,
const absl::optional<base::UnguessableToken>& window_id,
uint32_t request_id,
const GURL& url,
bool first_auth_attempt,
@ -82,7 +82,7 @@ class SimpleURLLoaderWrapper
bool fatal,
OnSSLCertificateErrorCallback response) override;
void OnCertificateRequested(
const base::Optional<base::UnguessableToken>& window_id,
const absl::optional<base::UnguessableToken>& window_id,
const scoped_refptr<net::SSLCertRequestInfo>& cert_info,
mojo::PendingRemote<network::mojom::ClientCertificateResponder>
client_cert_responder) override {}

View file

@ -16,7 +16,6 @@
#include "base/files/file_util.h"
#include "base/json/json_reader.h"
#include "base/no_destructor.h"
#include "base/optional.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/current_thread.h"
#include "base/task/post_task.h"
@ -122,6 +121,7 @@
#include "shell/common/process_util.h"
#include "shell/common/v8_value_serializer.h"
#include "storage/browser/file_system/isolated_context.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/common/input/web_input_event.h"
#include "third_party/blink/public/common/messaging/transferable_message_mojom_traits.h"
@ -385,7 +385,7 @@ void OnCapturePageDone(gin_helper::Promise<gfx::Image> promise,
promise.Resolve(gfx::Image::CreateFrom1xBitmap(bitmap));
}
base::Optional<base::TimeDelta> GetCursorBlinkInterval() {
absl::optional<base::TimeDelta> GetCursorBlinkInterval() {
#if defined(OS_MAC)
base::TimeDelta interval;
if (ui::TextInsertionCaretBlinkPeriod(&interval))
@ -401,7 +401,7 @@ base::Optional<base::TimeDelta> GetCursorBlinkInterval() {
: base::TimeDelta::FromMilliseconds(system_msec);
}
#endif
return base::nullopt;
return absl::nullopt;
}
#if BUILDFLAG(ENABLE_PRINTING)

View file

@ -182,7 +182,7 @@ void WebFrameMain::OnRendererConnectionError() {
void WebFrameMain::PostMessage(v8::Isolate* isolate,
const std::string& channel,
v8::Local<v8::Value> message_value,
base::Optional<v8::Local<v8::Value>> transfer) {
absl::optional<v8::Local<v8::Value>> transfer) {
blink::TransferableMessage transferable_message;
if (!electron::SerializeV8Value(isolate, message_value,
&transferable_message)) {

View file

@ -12,6 +12,7 @@
#include "base/process/process.h"
#include "gin/handle.h"
#include "gin/wrappable.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "shell/common/gin_helper/constructible.h"
#include "shell/common/gin_helper/pinnable.h"
#include "third_party/blink/public/mojom/page/page_visibility_state.mojom-forward.h"
@ -87,7 +88,7 @@ class WebFrameMain : public gin::Wrappable<WebFrameMain>,
void PostMessage(v8::Isolate* isolate,
const std::string& channel,
v8::Local<v8::Value> message_value,
base::Optional<v8::Local<v8::Value>> transfer);
absl::optional<v8::Local<v8::Value>> transfer);
int FrameTreeNodeID() const;
std::string Name() const;

View file

@ -7,7 +7,7 @@
#include <memory>
#include <utility>
#include "base/optional.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#if defined(OS_WIN)
#include <windows.h>
@ -34,14 +34,14 @@ mach_port_t TaskForPid(pid_t pid) {
return task;
}
base::Optional<mach_task_basic_info_data_t> GetTaskInfo(mach_port_t task) {
absl::optional<mach_task_basic_info_data_t> GetTaskInfo(mach_port_t task) {
if (task == MACH_PORT_NULL)
return base::nullopt;
return absl::nullopt;
mach_task_basic_info_data_t info = {};
mach_msg_type_number_t count = MACH_TASK_BASIC_INFO_COUNT;
kern_return_t kr = task_info(task, MACH_TASK_BASIC_INFO,
reinterpret_cast<task_info_t>(&info), &count);
return (kr == KERN_SUCCESS) ? base::make_optional(info) : base::nullopt;
return (kr == KERN_SUCCESS) ? absl::make_optional(info) : absl::nullopt;
}
} // namespace