Update to Chromium version 127.0.6533.0 (#1313161)

This commit is contained in:
Marshall Greenblatt
2024-06-14 13:01:45 -04:00
parent 4ed13d8c47
commit c44aa35bfc
144 changed files with 877 additions and 910 deletions

View File

@@ -311,11 +311,6 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
registry->RegisterBooleanPref(
prefs::kAccessControlAllowMethodsInCORSPreflightSpecConformant, true);
// Based on browser_prefs::RegisterProfilePrefs.
registry->RegisterBooleanPref(prefs::kAccessibilityPdfOcrAlwaysActive,
false);
registry->RegisterBooleanPref(prefs::kBlockTruncatedCookies, true);
// Spell checking preferences.
// Modify defaults from SpellcheckServiceFactory::RegisterProfilePrefs.
std::string spellcheck_lang =

View File

@@ -86,7 +86,7 @@ PersistentPrefStore::PrefReadError CefPrefStore::ReadPrefs() {
void CefPrefStore::ReadPrefsAsync(ReadErrorDelegate* error_delegate) {
DCHECK(!pending_async_read_);
error_delegate_.reset(error_delegate);
error_delegate_.emplace(error_delegate);
if (block_async_read_) {
pending_async_read_ = true;
} else {
@@ -106,6 +106,10 @@ void CefPrefStore::SchedulePendingLossyWrites() {}
void CefPrefStore::OnStoreDeletionFromDisk() {}
bool CefPrefStore::HasReadErrorDelegate() const {
return error_delegate_.has_value();
}
void CefPrefStore::SetInitializationCompleted() {
NotifyInitializationCompleted();
}
@@ -119,8 +123,9 @@ void CefPrefStore::NotifyPrefValueChanged(const std::string& key) {
void CefPrefStore::NotifyInitializationCompleted() {
DCHECK(!init_complete_);
init_complete_ = true;
if (read_success_ && read_error_ != PREF_READ_ERROR_NONE && error_delegate_) {
error_delegate_->OnError(read_error_);
if (read_success_ && read_error_ != PREF_READ_ERROR_NONE &&
error_delegate_.has_value() && error_delegate_.value()) {
error_delegate_.value()->OnError(read_error_);
}
for (Observer& observer : observers_) {
observer.OnInitializationCompleted(read_success_);

View File

@@ -7,6 +7,7 @@
#include <stdint.h>
#include <optional>
#include <string>
#include "base/observer_list.h"
@@ -51,6 +52,7 @@ class CefPrefStore : public PersistentPrefStore {
base::OnceClosure synchronous_done_callback) override;
void SchedulePendingLossyWrites() override;
void OnStoreDeletionFromDisk() override;
bool HasReadErrorDelegate() const override;
// Marks the store as having completed initialization.
void SetInitializationCompleted();
@@ -111,7 +113,8 @@ class CefPrefStore : public PersistentPrefStore {
// mutation.
bool committed_ = true;
std::unique_ptr<ReadErrorDelegate> error_delegate_;
// Optional so we can differentiate `nullopt` from `nullptr`.
std::optional<std::unique_ptr<ReadErrorDelegate>> error_delegate_;
base::ObserverList<PrefStore::Observer, true>::Unchecked observers_;
};