chore: bump chromium to 63be48daea281d4f8c834c2e707a7 (master) (#19923)
This commit is contained in:
parent
104088b86b
commit
eb2d2264d0
124 changed files with 1736 additions and 1410 deletions
|
@ -396,8 +396,8 @@ std::unique_ptr<SkRegion> BrowserWindow::DraggableRegionsToSkRegion(
|
|||
auto sk_region = std::make_unique<SkRegion>();
|
||||
for (const auto& region : regions) {
|
||||
sk_region->op(
|
||||
region->bounds.x(), region->bounds.y(), region->bounds.right(),
|
||||
region->bounds.bottom(),
|
||||
{region->bounds.x(), region->bounds.y(), region->bounds.right(),
|
||||
region->bounds.bottom()},
|
||||
region->draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
|
||||
}
|
||||
return sk_region;
|
||||
|
|
|
@ -47,7 +47,7 @@ std::vector<gfx::Rect> CalculateNonDraggableRegions(
|
|||
int height) {
|
||||
std::vector<gfx::Rect> result;
|
||||
SkRegion non_draggable;
|
||||
non_draggable.op(0, 0, width, height, SkRegion::kUnion_Op);
|
||||
non_draggable.op({0, 0, width, height}, SkRegion::kUnion_Op);
|
||||
non_draggable.op(*draggable, SkRegion::kDifference_Op);
|
||||
for (SkRegion::Iterator it(non_draggable); !it.done(); it.next()) {
|
||||
result.push_back(gfx::SkIRectToRect(it.rect()));
|
||||
|
|
|
@ -88,8 +88,10 @@ v8::Local<v8::Promise> StopRecording(mate::Arguments* args) {
|
|||
StopTracing(std::move(promise), base::make_optional(path));
|
||||
} else {
|
||||
// use a temporary file.
|
||||
base::PostTaskWithTraitsAndReplyWithResult(
|
||||
FROM_HERE, {base::MayBlock(), base::TaskPriority::USER_VISIBLE},
|
||||
base::PostTaskAndReplyWithResult(
|
||||
FROM_HERE,
|
||||
{base::ThreadPool(), base::MayBlock(),
|
||||
base::TaskPriority::USER_VISIBLE},
|
||||
base::BindOnce(CreateTemporaryFileOnIO),
|
||||
base::BindOnce(StopTracing, std::move(promise)));
|
||||
}
|
||||
|
|
|
@ -135,25 +135,25 @@ void FilterCookies(const base::Value& filter,
|
|||
|
||||
std::string InclusionStatusToString(
|
||||
net::CanonicalCookie::CookieInclusionStatus status) {
|
||||
switch (status) {
|
||||
case net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_HTTP_ONLY:
|
||||
return "Failed to create httponly cookie";
|
||||
case net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_SECURE_ONLY:
|
||||
return "Cannot create a secure cookie from an insecure URL";
|
||||
case net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_FAILURE_TO_STORE:
|
||||
return "Failed to parse cookie";
|
||||
case net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_INVALID_DOMAIN:
|
||||
return "Failed to get cookie domain";
|
||||
case net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_INVALID_PREFIX:
|
||||
return "Failed because the cookie violated prefix rules.";
|
||||
case net::CanonicalCookie::CookieInclusionStatus::
|
||||
EXCLUDE_NONCOOKIEABLE_SCHEME:
|
||||
return "Cannot set cookie for current scheme";
|
||||
case net::CanonicalCookie::CookieInclusionStatus::INCLUDE:
|
||||
return "";
|
||||
default:
|
||||
return "Setting cookie failed";
|
||||
}
|
||||
if (status.HasExclusionReason(
|
||||
net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_HTTP_ONLY))
|
||||
return "Failed to create httponly cookie";
|
||||
if (status.HasExclusionReason(
|
||||
net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_SECURE_ONLY))
|
||||
return "Cannot create a secure cookie from an insecure URL";
|
||||
if (status.HasExclusionReason(net::CanonicalCookie::CookieInclusionStatus::
|
||||
EXCLUDE_FAILURE_TO_STORE))
|
||||
return "Failed to parse cookie";
|
||||
if (status.HasExclusionReason(
|
||||
net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_INVALID_DOMAIN))
|
||||
return "Failed to get cookie domain";
|
||||
if (status.HasExclusionReason(
|
||||
net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_INVALID_PREFIX))
|
||||
return "Failed because the cookie violated prefix rules.";
|
||||
if (status.HasExclusionReason(net::CanonicalCookie::CookieInclusionStatus::
|
||||
EXCLUDE_NONCOOKIEABLE_SCHEME))
|
||||
return "Cannot set cookie for current scheme";
|
||||
return "Setting cookie failed";
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -248,14 +248,18 @@ v8::Local<v8::Promise> Cookies::Set(const base::DictionaryValue& details) {
|
|||
|
||||
GURL url(url_string ? *url_string : "");
|
||||
if (!url.is_valid()) {
|
||||
promise.RejectWithErrorMessage(InclusionStatusToString(
|
||||
net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_INVALID_DOMAIN));
|
||||
promise.RejectWithErrorMessage(
|
||||
InclusionStatusToString(net::CanonicalCookie::CookieInclusionStatus(
|
||||
net::CanonicalCookie::CookieInclusionStatus::
|
||||
EXCLUDE_INVALID_DOMAIN)));
|
||||
return handle;
|
||||
}
|
||||
|
||||
if (!name || name->empty()) {
|
||||
promise.RejectWithErrorMessage(InclusionStatusToString(
|
||||
net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_FAILURE_TO_STORE));
|
||||
promise.RejectWithErrorMessage(
|
||||
InclusionStatusToString(net::CanonicalCookie::CookieInclusionStatus(
|
||||
net::CanonicalCookie::CookieInclusionStatus::
|
||||
EXCLUDE_FAILURE_TO_STORE)));
|
||||
return handle;
|
||||
}
|
||||
|
||||
|
@ -264,8 +268,10 @@ v8::Local<v8::Promise> Cookies::Set(const base::DictionaryValue& details) {
|
|||
creation_time, expiration_time, last_access_time, secure, http_only,
|
||||
net::CookieSameSite::NO_RESTRICTION, net::COOKIE_PRIORITY_DEFAULT);
|
||||
if (!canonical_cookie || !canonical_cookie->IsCanonical()) {
|
||||
promise.RejectWithErrorMessage(InclusionStatusToString(
|
||||
net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_FAILURE_TO_STORE));
|
||||
promise.RejectWithErrorMessage(
|
||||
InclusionStatusToString(net::CanonicalCookie::CookieInclusionStatus(
|
||||
net::CanonicalCookie::CookieInclusionStatus::
|
||||
EXCLUDE_FAILURE_TO_STORE)));
|
||||
return handle;
|
||||
}
|
||||
net::CookieOptions options;
|
||||
|
@ -281,11 +287,10 @@ v8::Local<v8::Promise> Cookies::Set(const base::DictionaryValue& details) {
|
|||
base::BindOnce(
|
||||
[](util::Promise<void*> promise,
|
||||
net::CanonicalCookie::CookieInclusionStatus status) {
|
||||
auto errmsg = InclusionStatusToString(status);
|
||||
if (errmsg.empty()) {
|
||||
if (status.IsInclude()) {
|
||||
promise.Resolve();
|
||||
} else {
|
||||
promise.RejectWithErrorMessage(errmsg);
|
||||
promise.RejectWithErrorMessage(InclusionStatusToString(status));
|
||||
}
|
||||
},
|
||||
std::move(promise)));
|
||||
|
|
|
@ -33,7 +33,7 @@ KeyWeakMap<std::string> g_weak_map;
|
|||
class DataPipeReader {
|
||||
public:
|
||||
DataPipeReader(util::Promise<v8::Local<v8::Value>> promise,
|
||||
network::mojom::DataPipeGetterPtr data_pipe_getter)
|
||||
mojo::Remote<network::mojom::DataPipeGetter> data_pipe_getter)
|
||||
: promise_(std::move(promise)),
|
||||
data_pipe_getter_(std::move(data_pipe_getter)),
|
||||
handle_watcher_(FROM_HERE,
|
||||
|
@ -109,7 +109,7 @@ class DataPipeReader {
|
|||
// Destroy data pipe.
|
||||
handle_watcher_.Cancel();
|
||||
data_pipe_.reset();
|
||||
data_pipe_getter_ = nullptr;
|
||||
data_pipe_getter_.reset();
|
||||
}
|
||||
|
||||
static void FreeBuffer(char* data, void* self) {
|
||||
|
@ -118,7 +118,7 @@ class DataPipeReader {
|
|||
|
||||
util::Promise<v8::Local<v8::Value>> promise_;
|
||||
|
||||
network::mojom::DataPipeGetterPtr data_pipe_getter_;
|
||||
mojo::Remote<network::mojom::DataPipeGetter> data_pipe_getter_;
|
||||
mojo::ScopedDataPipeConsumerHandle data_pipe_;
|
||||
mojo::SimpleWatcher handle_watcher_;
|
||||
|
||||
|
@ -141,8 +141,9 @@ class DataPipeReader {
|
|||
gin::WrapperInfo DataPipeHolder::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
DataPipeHolder::DataPipeHolder(const network::DataElement& element)
|
||||
: id_(base::NumberToString(++g_next_id)),
|
||||
data_pipe_(element.CloneDataPipeGetter()) {}
|
||||
: id_(base::NumberToString(++g_next_id)) {
|
||||
data_pipe_.Bind(element.CloneDataPipeGetter());
|
||||
}
|
||||
|
||||
DataPipeHolder::~DataPipeHolder() = default;
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "gin/handle.h"
|
||||
#include "gin/wrappable.h"
|
||||
#include "mojo/public/cpp/bindings/remote.h"
|
||||
#include "services/network/public/cpp/data_element.h"
|
||||
#include "services/network/public/mojom/data_pipe_getter.mojom.h"
|
||||
|
||||
|
@ -41,7 +42,7 @@ class DataPipeHolder : public gin::Wrappable<DataPipeHolder> {
|
|||
~DataPipeHolder() override;
|
||||
|
||||
std::string id_;
|
||||
network::mojom::DataPipeGetterPtr data_pipe_;
|
||||
mojo::Remote<network::mojom::DataPipeGetter> data_pipe_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(DataPipeHolder);
|
||||
};
|
||||
|
|
|
@ -34,10 +34,9 @@ void NativeTheme::OnNativeThemeUpdatedOnUI() {
|
|||
}
|
||||
|
||||
void NativeTheme::OnNativeThemeUpdated(ui::NativeTheme* theme) {
|
||||
base::PostTaskWithTraits(
|
||||
FROM_HERE, {content::BrowserThread::UI},
|
||||
base::BindOnce(&NativeTheme::OnNativeThemeUpdatedOnUI,
|
||||
base::Unretained(this)));
|
||||
base::PostTask(FROM_HERE, {content::BrowserThread::UI},
|
||||
base::BindOnce(&NativeTheme::OnNativeThemeUpdatedOnUI,
|
||||
base::Unretained(this)));
|
||||
}
|
||||
|
||||
void NativeTheme::SetThemeSource(ui::NativeTheme::ThemeSource override) {
|
||||
|
|
|
@ -53,8 +53,8 @@ scoped_refptr<base::SequencedTaskRunner> CreateFileTaskRunner() {
|
|||
//
|
||||
// These operations can be skipped on shutdown since FileNetLogObserver's API
|
||||
// doesn't require things to have completed until notified of completion.
|
||||
return base::CreateSequencedTaskRunnerWithTraits(
|
||||
{base::MayBlock(), base::TaskPriority::USER_VISIBLE,
|
||||
return base::CreateSequencedTaskRunner(
|
||||
{base::ThreadPool(), base::MayBlock(), base::TaskPriority::USER_VISIBLE,
|
||||
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN});
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
#include "content/public/browser/download_manager_delegate.h"
|
||||
#include "content/public/browser/network_service_instance.h"
|
||||
#include "content/public/browser/storage_partition.h"
|
||||
#include "mojo/public/cpp/bindings/strong_binding.h"
|
||||
#include "mojo/public/cpp/bindings/pending_remote.h"
|
||||
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
|
||||
#include "native_mate/dictionary.h"
|
||||
#include "native_mate/object_template_builder.h"
|
||||
#include "net/base/completion_repeating_callback.h"
|
||||
|
@ -401,14 +402,16 @@ void Session::SetCertVerifyProc(v8::Local<v8::Value> val,
|
|||
return;
|
||||
}
|
||||
|
||||
network::mojom::CertVerifierClientPtr cert_verifier_client;
|
||||
mojo::PendingRemote<network::mojom::CertVerifierClient>
|
||||
cert_verifier_client_remote;
|
||||
if (proc) {
|
||||
mojo::MakeStrongBinding(std::make_unique<CertVerifierClient>(proc),
|
||||
mojo::MakeRequest(&cert_verifier_client));
|
||||
mojo::MakeSelfOwnedReceiver(
|
||||
std::make_unique<CertVerifierClient>(proc),
|
||||
cert_verifier_client_remote.InitWithNewPipeAndPassReceiver());
|
||||
}
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_.get())
|
||||
->GetNetworkContext()
|
||||
->SetCertVerifierClient(std::move(cert_verifier_client));
|
||||
->SetCertVerifierClient(std::move(cert_verifier_client_remote));
|
||||
|
||||
// This causes the cert verifier cache to be cleared.
|
||||
content::GetNetworkService()->OnCertDBChanged();
|
||||
|
@ -637,7 +640,7 @@ void Session::Preconnect(const mate::Dictionary& options,
|
|||
}
|
||||
|
||||
DCHECK_GT(num_sockets_to_preconnect, 0);
|
||||
base::PostTaskWithTraits(
|
||||
base::PostTask(
|
||||
FROM_HERE, {content::BrowserThread::UI},
|
||||
base::BindOnce(&StartPreconnectOnUI, base::RetainedRef(browser_context_),
|
||||
url, num_sockets_to_preconnect));
|
||||
|
|
|
@ -240,7 +240,7 @@ class TopLevelWindow : public mate::TrackableObject<TopLevelWindow>,
|
|||
|
||||
template <typename... Args>
|
||||
void EmitEventSoon(base::StringPiece eventName) {
|
||||
base::PostTaskWithTraits(
|
||||
base::PostTask(
|
||||
FROM_HERE, {content::BrowserThread::UI},
|
||||
base::BindOnce(base::IgnoreResult(&TopLevelWindow::Emit<Args...>),
|
||||
weak_factory_.GetWeakPtr(), eventName));
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <utility>
|
||||
|
||||
#include "mojo/public/cpp/bindings/receiver_set.h"
|
||||
#include "mojo/public/cpp/system/string_data_source.h"
|
||||
#include "native_mate/dictionary.h"
|
||||
#include "native_mate/object_template_builder.h"
|
||||
|
@ -112,9 +113,10 @@ class MultipartDataPipeGetter : public UploadDataPipeGetter,
|
|||
~MultipartDataPipeGetter() override = default;
|
||||
|
||||
void AttachToRequestBody(network::ResourceRequestBody* body) override {
|
||||
network::mojom::DataPipeGetterPtr data_pipe_getter;
|
||||
binding_set_.AddBinding(this, mojo::MakeRequest(&data_pipe_getter));
|
||||
body->AppendDataPipe(std::move(data_pipe_getter));
|
||||
mojo::PendingRemote<network::mojom::DataPipeGetter> data_pipe_getter_remote;
|
||||
receivers_.Add(this,
|
||||
data_pipe_getter_remote.InitWithNewPipeAndPassReceiver());
|
||||
body->AppendDataPipe(std::move(data_pipe_getter_remote));
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -125,11 +127,12 @@ class MultipartDataPipeGetter : public UploadDataPipeGetter,
|
|||
SetPipe(std::move(pipe));
|
||||
}
|
||||
|
||||
void Clone(network::mojom::DataPipeGetterRequest request) override {
|
||||
binding_set_.AddBinding(this, std::move(request));
|
||||
void Clone(
|
||||
mojo::PendingReceiver<network::mojom::DataPipeGetter> receiver) override {
|
||||
receivers_.Add(this, std::move(receiver));
|
||||
}
|
||||
|
||||
mojo::BindingSet<network::mojom::DataPipeGetter> binding_set_;
|
||||
mojo::ReceiverSet<network::mojom::DataPipeGetter> receivers_;
|
||||
};
|
||||
|
||||
// Streaming chunked data to NetworkService.
|
||||
|
@ -141,9 +144,11 @@ class ChunkedDataPipeGetter : public UploadDataPipeGetter,
|
|||
~ChunkedDataPipeGetter() override = default;
|
||||
|
||||
void AttachToRequestBody(network::ResourceRequestBody* body) override {
|
||||
network::mojom::ChunkedDataPipeGetterPtr data_pipe_getter;
|
||||
binding_set_.AddBinding(this, mojo::MakeRequest(&data_pipe_getter));
|
||||
body->SetToChunkedDataPipe(std::move(data_pipe_getter));
|
||||
mojo::PendingRemote<network::mojom::ChunkedDataPipeGetter>
|
||||
data_pipe_getter_remote;
|
||||
receiver_set_.Add(this,
|
||||
data_pipe_getter_remote.InitWithNewPipeAndPassReceiver());
|
||||
body->SetToChunkedDataPipe(std::move(data_pipe_getter_remote));
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -156,7 +161,7 @@ class ChunkedDataPipeGetter : public UploadDataPipeGetter,
|
|||
SetPipe(std::move(pipe));
|
||||
}
|
||||
|
||||
mojo::BindingSet<network::mojom::ChunkedDataPipeGetter> binding_set_;
|
||||
mojo::ReceiverSet<network::mojom::ChunkedDataPipeGetter> receiver_set_;
|
||||
};
|
||||
|
||||
URLRequestNS::URLRequestNS(mate::Arguments* args) : weak_factory_(this) {
|
||||
|
|
|
@ -66,7 +66,8 @@ void GPUInfoManager::CompleteInfoFetcher(
|
|||
complete_info_promise_set_.emplace_back(std::move(promise));
|
||||
|
||||
if (NeedsCompleteGpuInfoCollection()) {
|
||||
gpu_data_manager_->RequestCompleteGpuInfoIfNeeded();
|
||||
gpu_data_manager_->RequestCompleteGpuInfoIfNeeded(
|
||||
content::kGpuInfoRequestAll, /* delayed */ false);
|
||||
} else {
|
||||
GPUInfoManager::OnGpuInfoUpdate();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue