ShortcutsBackend initializes asynchronously. When clearBrowsingData() was called during startup, the backend was still in the INITIALIZING state and its OnHistoryDeletions handler silently returned early, leaving shortcut suggestions (clock-icon entries) intact after exit. Fix by adding a JNI bridge (BraveShortcutsUtils.initThenRun) that waits for ShortcutsBackend to finish its async DB init via OnShortcutsLoaded() before invoking clearBrowsingData(). Also move the clear-on-exit call from initializeState() to finishNativeInitialization() where the profile is available, and add FORM_DATA (autofill) to the cleared data types.
20 lines
574 B
Plaintext
20 lines
574 B
Plaintext
# Copyright (c) 2026 The Brave Authors. All rights reserved.
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
# You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
assert(is_android)
|
|
|
|
source_set("browsing_data") {
|
|
sources = [ "brave_shortcuts_utils.cc" ]
|
|
|
|
deps = [
|
|
"//base",
|
|
"//chrome/android:chrome_jni_headers",
|
|
"//chrome/browser/autocomplete",
|
|
"//chrome/browser/profiles:profile",
|
|
"//components/omnibox/browser",
|
|
"//third_party/jni_zero",
|
|
]
|
|
}
|