mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 127.0.6533.0 (#1313161)
This commit is contained in:
@@ -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 =
|
||||
|
@@ -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_);
|
||||
|
@@ -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_;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user