Skip to content

Commit 03ac6cf

Browse files
committed
Add bookmark import/export actions: remove the 10 MB limit for importing bookmarks (#2527)
1 parent 8a6d940 commit 03ac6cf

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

build/patches/Add-bookmark-import-export-actions.patch

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
1717
.../app/bookmarks/BookmarkActivity.java | 32 ++
1818
.../native_page/NativePageFactory.java | 9 +-
1919
chrome/browser/BUILD.gn | 11 +-
20-
.../bookmarks/android/bookmark_bridge.cc | 197 ++++++++++++
20+
.../bookmarks/android/bookmark_bridge.cc | 192 ++++++++++++
2121
.../bookmarks/android/bookmark_bridge.h | 30 +-
2222
.../browser/bookmarks/BookmarkBridge.java | 39 +++
2323
.../browser/bookmarks/BookmarkDelegate.java | 10 +
@@ -51,7 +51,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
5151
ui/shell_dialogs/select_file_dialog_linux.cc | 4 +
5252
ui/shell_dialogs/select_file_dialog_linux.h | 2 +
5353
ui/shell_dialogs/select_file_dialog_win.cc | 5 +
54-
40 files changed, 810 insertions(+), 24 deletions(-)
54+
40 files changed, 805 insertions(+), 24 deletions(-)
5555
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/add-bookmark-import-export-actions.inc
5656
create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/add-bookmark-import-export-actions.inc
5757
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
322322
}
323323

324324
void BookmarkBridge::Destroy(JNIEnv* env) {
325-
@@ -847,6 +873,177 @@ jint BookmarkBridge::GetTotalBookmarkCount(
325+
@@ -847,6 +873,172 @@ jint BookmarkBridge::GetTotalBookmarkCount(
326326
return count;
327327
}
328328

@@ -449,11 +449,6 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse
449449
+ return "";
450450
+ }
451451
+
452-
+ if (fileLength > 10 * 1024 * 1024) {
453-
+ select_file_dialog_->ShowToast("Bookmark file is bigger than 10MB");
454-
+ return "";
455-
+ }
456-
+
457452
+ std::vector<char> buffer(fileLength);
458453
+ if (-1 == file.ReadAtCurrentPos(buffer.data(), fileLength)) {
459454
+ select_file_dialog_->ShowToast("Could not read bookmarks file");

0 commit comments

Comments
 (0)