chore: bump chromium to 87.0.4251.1 (11-x-y) (#25259)

This commit is contained in:
John Kleinschmidt
2020-09-15 12:52:14 -04:00
committed by GitHub
parent 35d2727de0
commit b88396cf00
68 changed files with 416 additions and 443 deletions

View File

@@ -252,7 +252,8 @@ gin::WrapperInfo SimpleURLLoaderWrapper::kWrapperInfo = {
SimpleURLLoaderWrapper::SimpleURLLoaderWrapper(
std::unique_ptr<network::ResourceRequest> request,
network::mojom::URLLoaderFactory* url_loader_factory)
network::mojom::URLLoaderFactory* url_loader_factory,
int options)
: id_(GetAllRequests().Add(this)) {
// We slightly abuse the |render_frame_id| field in ResourceRequest so that
// we can correlate any authentication events that arrive with this request.
@@ -269,6 +270,7 @@ SimpleURLLoaderWrapper::SimpleURLLoaderWrapper(
}
loader_->SetAllowHttpErrorResults(true);
loader_->SetURLLoaderFactoryOptions(options);
loader_->SetOnResponseStartedCallback(base::BindOnce(
&SimpleURLLoaderWrapper::OnResponseStarted, base::Unretained(this)));
loader_->SetOnRedirectCallback(base::BindRepeating(
@@ -367,8 +369,10 @@ gin::Handle<SimpleURLLoaderWrapper> SimpleURLLoaderWrapper::Create(
bool use_session_cookies = false;
opts.Get("useSessionCookies", &use_session_cookies);
int options = 0;
if (!use_session_cookies) {
request->load_flags |= net::LOAD_DO_NOT_SEND_COOKIES;
request->credentials_mode = network::mojom::CredentialsMode::kInclude;
options |= network::mojom::kURLLoadOptionBlockAllCookies;
}
// Chromium filters headers using browser rules, while for net module we have
@@ -411,7 +415,8 @@ gin::Handle<SimpleURLLoaderWrapper> SimpleURLLoaderWrapper::Create(
auto ret = gin::CreateHandle(
args->isolate(),
new SimpleURLLoaderWrapper(std::move(request), url_loader_factory.get()));
new SimpleURLLoaderWrapper(std::move(request), url_loader_factory.get(),
options));
ret->Pin();
if (!chunk_pipe_getter.IsEmpty()) {
ret->PinBodyGetter(chunk_pipe_getter);

View File

@@ -64,7 +64,8 @@ class SimpleURLLoaderWrapper
private:
SimpleURLLoaderWrapper(std::unique_ptr<network::ResourceRequest> loader,
network::mojom::URLLoaderFactory* url_loader_factory);
network::mojom::URLLoaderFactory* url_loader_factory,
int options);
// SimpleURLLoaderStreamConsumer:
void OnDataReceived(base::StringPiece string_piece,

View File

@@ -394,7 +394,7 @@ base::string16 GetDefaultPrinterAsync() {
scoped_refptr<printing::PrintBackend> backend =
printing::PrintBackend::CreateInstance(
nullptr, g_browser_process->GetApplicationLocale());
g_browser_process->GetApplicationLocale());
std::string printer_name = backend->GetDefaultPrinterName();
return base::UTF8ToUTF16(printer_name);
}
@@ -1558,7 +1558,7 @@ void WebContents::SetBackgroundThrottling(bool allowed) {
web_contents()->GetRenderViewHost()->SetSchedulerThrottling(allowed);
if (rwh_impl->is_hidden()) {
rwh_impl->WasShown(base::nullopt);
rwh_impl->WasShown({});
}
}
@@ -2068,8 +2068,9 @@ void WebContents::Print(gin::Arguments* args) {
// Set whether to print color or greyscale
bool print_color = true;
options.Get("color", &print_color);
int color_setting = print_color ? printing::COLOR : printing::GRAY;
settings.SetIntKey(printing::kSettingColor, color_setting);
auto const color_model = print_color ? printing::mojom::ColorModel::kColor
: printing::mojom::ColorModel::kGray;
settings.SetIntKey(printing::kSettingColor, static_cast<int>(color_model));
// Is the orientation landscape or portrait.
bool landscape = false;
@@ -2185,7 +2186,7 @@ void WebContents::Print(gin::Arguments* args) {
std::vector<printing::PrinterBasicInfo> WebContents::GetPrinterList() {
std::vector<printing::PrinterBasicInfo> printers;
auto print_backend = printing::PrintBackend::CreateInstance(
nullptr, g_browser_process->GetApplicationLocale());
g_browser_process->GetApplicationLocale());
{
// TODO(deepak1556): Deprecate this api in favor of an
// async version and post a non blocing task call.

View File

@@ -165,10 +165,12 @@ void OverrideLinuxAppDataPath() {
base::PathService::Override(DIR_APP_DATA, path);
}
int BrowserX11ErrorHandler(Display* d, XErrorEvent* error) {
int BrowserX11ErrorHandler(Display* d, XErrorEvent* e) {
if (!g_in_x11_io_error_handler && base::ThreadTaskRunnerHandle::IsSet()) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(&x11::LogErrorEventDescription, *error));
FROM_HERE,
base::BindOnce(&x11::LogErrorEventDescription, e->serial, e->error_code,
e->request_code, e->minor_code));
}
return 0;
}

View File

@@ -307,10 +307,10 @@ void OffScreenRenderWidgetHostView::Show() {
delegated_frame_host_->AttachToCompositor(compositor_.get());
delegated_frame_host_->WasShown(
GetLocalSurfaceIdAllocation().local_surface_id(),
GetRootLayer()->bounds().size(), base::nullopt);
GetRootLayer()->bounds().size(), {});
if (render_widget_host_)
render_widget_host_->WasShown(base::nullopt);
render_widget_host_->WasShown({});
}
void OffScreenRenderWidgetHostView::Hide() {

View File

@@ -155,15 +155,14 @@ void AddPropertyFilters(
for (const std::string& attribute : base::SplitString(
attributes, " ", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY)) {
property_filters.push_back(
content::AccessibilityTreeFormatter::PropertyFilter(
base::ASCIIToUTF16(attribute), type));
content::AccessibilityTreeFormatter::PropertyFilter(attribute, type));
}
}
bool MatchesPropertyFilters(
const std::vector<content::AccessibilityTreeFormatter::PropertyFilter>&
property_filters,
const base::string16& text) {
const std::string& text) {
bool allow = false;
for (const auto& filter : property_filters) {
if (base::MatchPattern(text, filter.match_str)) {
@@ -172,7 +171,7 @@ bool MatchesPropertyFilters(
allow = true;
break;
case content::AccessibilityTreeFormatter::PropertyFilter::ALLOW:
allow = (!base::MatchPattern(text, base::UTF8ToUTF16("*=''")));
allow = (!base::MatchPattern(text, "*=''"));
break;
case content::AccessibilityTreeFormatter::PropertyFilter::DENY:
allow = false;
@@ -184,26 +183,25 @@ bool MatchesPropertyFilters(
}
std::string RecursiveDumpAXPlatformNodeAsString(
ui::AXPlatformNode* node,
const ui::AXPlatformNode* node,
int indent,
const std::vector<content::AccessibilityTreeFormatter::PropertyFilter>&
property_filters) {
if (!node)
return "";
std::string str(2 * indent, '+');
std::string line = node->GetDelegate()->GetData().ToString();
std::vector<std::string> attributes = base::SplitString(
const std::string line = node->GetDelegate()->GetData().ToString();
const std::vector<std::string> attributes = base::SplitString(
line, " ", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
for (std::string attribute : attributes) {
if (MatchesPropertyFilters(property_filters,
base::UTF8ToUTF16(attribute))) {
for (const std::string& attribute : attributes) {
if (MatchesPropertyFilters(property_filters, attribute)) {
str += attribute + " ";
}
}
str += "\n";
for (int i = 0; i < node->GetDelegate()->GetChildCount(); i++) {
gfx::NativeViewAccessible child = node->GetDelegate()->ChildAtIndex(i);
ui::AXPlatformNode* child_node =
const ui::AXPlatformNode* child_node =
ui::AXPlatformNode::FromNativeViewAccessible(child);
str += RecursiveDumpAXPlatformNodeAsString(child_node, indent + 1,
property_filters);