From 03ac6cfc476db5ae29deb065ee23b32cfe736f5e Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Tue, 2 Dec 2025 17:01:28 +0100 Subject: [PATCH] Add bookmark import/export actions: remove the 10 MB limit for importing bookmarks (#2527) --- .../patches/Add-bookmark-import-export-actions.patch | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/build/patches/Add-bookmark-import-export-actions.patch b/build/patches/Add-bookmark-import-export-actions.patch index 35e8af51..1c0c71fc 100644 --- a/build/patches/Add-bookmark-import-export-actions.patch +++ b/build/patches/Add-bookmark-import-export-actions.patch @@ -17,7 +17,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../app/bookmarks/BookmarkActivity.java | 32 ++ .../native_page/NativePageFactory.java | 9 +- chrome/browser/BUILD.gn | 11 +- - .../bookmarks/android/bookmark_bridge.cc | 197 ++++++++++++ + .../bookmarks/android/bookmark_bridge.cc | 192 ++++++++++++ .../bookmarks/android/bookmark_bridge.h | 30 +- .../browser/bookmarks/BookmarkBridge.java | 39 +++ .../browser/bookmarks/BookmarkDelegate.java | 10 + @@ -51,7 +51,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html ui/shell_dialogs/select_file_dialog_linux.cc | 4 + ui/shell_dialogs/select_file_dialog_linux.h | 2 + ui/shell_dialogs/select_file_dialog_win.cc | 5 + - 40 files changed, 810 insertions(+), 24 deletions(-) + 40 files changed, 805 insertions(+), 24 deletions(-) create mode 100644 cromite_flags/chrome/browser/about_flags_cc/add-bookmark-import-export-actions.inc create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/add-bookmark-import-export-actions.inc create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/add-bookmark-import-export-actions.inc @@ -322,7 +322,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse } void BookmarkBridge::Destroy(JNIEnv* env) { -@@ -847,6 +873,177 @@ jint BookmarkBridge::GetTotalBookmarkCount( +@@ -847,6 +873,172 @@ jint BookmarkBridge::GetTotalBookmarkCount( return count; } @@ -449,11 +449,6 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse + return ""; + } + -+ if (fileLength > 10 * 1024 * 1024) { -+ select_file_dialog_->ShowToast("Bookmark file is bigger than 10MB"); -+ return ""; -+ } -+ + std::vector buffer(fileLength); + if (-1 == file.ReadAtCurrentPos(buffer.data(), fileLength)) { + select_file_dialog_->ShowToast("Could not read bookmarks file");