Commit Graph
62 Commits
Author SHA1 Message Date
mkarolin f6c85a6500 Lint fixes. 2021-02-04 23:54:30 -05:00
mkarolin 96fd63a076 Formatting fixes. 2021-02-04 23:54:30 -05:00
Brandon 508a997d87 Fixing iOS syncing. 2021-02-04 23:54:30 -05:00
mkarolin e476b684fc Formatting fixes. 2021-02-04 23:52:44 -05:00
Max Karolinskiy 83457d8fd5 [iOS] BookmarkNode c'tor now uses base::GUID instead of a std::string.
Chromium changes:

https://source.chromium.org/chromium/chromium/src/+/26cb15fed7a25af6721948f727bd3d6a5bca3516

commit 26cb15fed7a25af6721948f727bd3d6a5bca3516
Author: Daniel Hosseinian <dhoss@chromium.org>
Date:   Sat Nov 14 01:14:36 2020 +0000

    Use base::GUID in bookmarks::BookmarkNode's internals

    Store the GUID as a base::GUID instead of a std::string. Change the
    constructor of BookmarkNode to take a base::GUID. Modify the code
    around callers to make them compatible with the new API.

    BookmarkNode::guid() still returns a std::string(). It will be changed
    to return a base::GUID() in a follow-up.

    Bug: 1026195

https://source.chromium.org/chromium/chromium/src/+/6de24fa7a8fcdbbb522034162112174057c9bc3a

commit 6de24fa7a8fcdbbb522034162112174057c9bc3a
Author: Daniel Hosseinian <dhoss@chromium.org>
Date:   Tue Nov 17 19:19:53 2020 +0000

    Return a base::GUID from bookmarks::BookmarkNode::guid()

    Now that bookmarks::BookmarkNode stores a base::GUID instead of a
    std::string, return a base::GUID. Modify the code around callers to make
    them compatible with the new API.

    Bug: 1026195
2021-02-04 23:52:40 -05:00
Brandon a9a40f59ee Fixing Sync to use the brave_services_key (not sure why this was removed).
Adding back deleting other devices using the 1.20.x API (profile_helper).
Changed ResetSync to use the brave_sync::ResetSync from profile_helper.
2021-02-01 10:18:50 -07:00
mkarolin 74cfd56e8a base/bind_helpers.h -> callback_helpers.h II. 2021-01-05 21:27:44 -05:00
AlexeyBarabash 4210902231 SyncUserSettings::EnableEncryptEverything was removed.
Fixes sync-related build on Android and iOS.
Reflects PeopleHandler::HandleSetEncryption changes.

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/c28113d0bcc14e3b6f7507ab025add20b072da32

commit c28113d0bcc14e3b6f7507ab025add20b072da32
Author: Victor Hugo Vianna Silva <victorvianna@google.com>
Date:   Thu Oct 15 20:22:36 2020 +0000

    Remove SyncEncryptionHandler::*EncryptEverything* methods

    EnableEncryptEverything() and IsEncryptEverythingEnabled() were only
    relevant for the Directory implementation of Nigori, so they can be
    removed now, together with the associated plumbing.

    Bug: 1033040
2020-12-08 15:25:01 -05:00
Simon Hong 9acfdee04b Fix gn_check error on iOS 2020-12-04 09:56:30 +09:00
Brandon 3d5898a92a Fix Linting for Android/Linux 2020-12-02 20:19:46 -07:00
Brandon b21fda50d5 Fix signature of function callback.
Fixes https://github.com/brave/brave-browser/issues/12997
2020-12-02 20:19:46 -07:00
Brandon 46a8534545 Rename functions and add documentation explaining it.
Removed duplicate code.
2020-12-01 13:16:43 -05:00
Brandon 4f47f850bd Added folder filtering for the iOS side to prevent users from moving parent folders into child folders. 2020-12-01 11:31:11 -05:00
bridiver 5f447ac4ef clang format cleanup 2020-11-30 17:48:17 -07:00
bridiver bbdd555a80 fix lint 2020-11-30 13:54:21 -07:00
Brandon 41766d1264 Used the existing bookmark_codec to encode bookmarks instead of copy pasting and modifying. 2020-11-30 07:34:53 -05:00
Brian Clifton d1c39c73d5 Add missing gn deps 2020-11-30 07:34:52 -05:00
Brandon bb8760be69 Fixed bookmarks performance.
Fixed BookmarkNode naming for iOS.
2020-11-30 07:34:52 -05:00
Brandon fae6eb67a8 Fixed iOS compiling issues. C++ headers cannot be imported in an exported Objective-C header. 2020-11-30 07:34:52 -05:00
Brandon ee2eaf3a64 Fixed exporting of bookmark children and nested children for performance reasons. 2020-11-30 07:34:52 -05:00
bridiver 156b28bce7 fix weird incorrect lint errors like
ios/browser/api/bookmarks/brave_bookmarks_api.h:82:  Missing spaces around =  [whitespace/operators] [4]
and 
ios/browser/api/bookmarks/brave_bookmarks_api.h:64:  Using C-style cast.  Use reinterpret_cast<NSString*>(...) instead  [readability/casting] [4]
???
2020-11-30 07:34:52 -05:00
bridiver f5c57545f5 lint 2020-11-30 07:34:52 -05:00
bridiver 0bcc76e568 lint/clang format 2020-11-30 07:34:52 -05:00
bridiver b64cd13619 clang format 2020-11-30 07:34:52 -05:00
bridiver 5977b45c09 clang format 2020-11-30 07:34:52 -05:00
bridiver a695146f5f clang format 2020-11-30 07:34:52 -05:00
bridiver a21e9c40c8 clang format 2020-11-30 07:34:52 -05:00
bridiver a1e2c588ca clang format 2020-11-30 07:34:52 -05:00
bridiver bf567eaaf8 don't call GetApplicationContext to get the browser state in the observers 2020-11-30 07:34:52 -05:00
bridiver 6d627d3aed clang format 2020-11-30 07:34:52 -05:00
bridiver 23b3481092 clang format 2020-11-30 07:34:52 -05:00
Brandon e154f8db17 Added a boolean to determine if the underlying model has suddenly become null or destroyed such as when brave-ios/issues/3011 && brave-browser/issues/12530 happens.. 2020-11-30 07:34:51 -05:00
Brandon 8ef9352243 Addressing weird indentations. 2020-11-30 07:34:51 -05:00
Brandon a1c756570c Fixed a "possible" bug in fav_icon images. 2020-11-30 07:34:51 -05:00
Brandon a33361b442 Remove ability to delete device from sync chain :( 2020-11-30 07:34:51 -05:00
Brandon cc1503eb2c Fix sync worker to NOT use PrepareForFirstSync and CommitSyncChanges.
Removed ShimAllocator as it causes crashes on 13.4, 13.5 and the simulator.
2020-11-30 07:34:51 -05:00
Brandon 39a15233a5 Fixing PR feedback. 2020-11-30 07:34:51 -05:00
Brandon e4b7b63ac7 Minor changes to the interface to use properties.
Import favIcons via iOS APIs.
Updated API interface and added FavIcon encoding.
2020-11-30 07:34:51 -05:00
Brandon d65e26242d Fixed threading retaining with weak/strong specifies.
Added explicit ARC assertions to the top of the files.
2020-11-30 07:34:51 -05:00
Brandon 980e70a23c Cleanup optional interface.
Fixed Bookmarks importer/exporter to execute on the correct threads internally.
Added `TopLevelFolder` parameter for importing so that the iOS side can choose the name of the folder bookmarks will be imported into (this is mostly done for localization because iOS doesn't have access to IDS_BOOKMARKS_GROUP l10n resource key).
2020-11-30 07:34:51 -05:00
Brandon 3963e2c0b3 Export interface for iOS side to construct a bookmark IR model. 2020-11-30 07:34:51 -05:00
Brandon 7c4fd252ed Added Bookmark Export Utility for CoreData. 2020-11-30 07:34:51 -05:00
Brandon 3da843115a Add callbacks for Import and Export of bookmarks. 2020-11-30 07:34:50 -05:00
Brandon ca6c899317 Added importing and exporting bookmarks.
Refactored some other sync code.
Added deleting devices by guid.
2020-11-30 07:34:50 -05:00
Brandon 0528f44bf9 Import and Export bookmarks Interface linked. 2020-11-30 07:34:50 -05:00
Brandon adea3d2ed8 Made all observer functions optional because iOS doesn't need to use them all. 2020-11-30 07:34:50 -05:00
Brandon 0012e30d0d Minor changes to interface. 2020-11-30 07:34:50 -05:00
Brandon f7e72bcaa7 Fixed device not showing up on sync chain when codes are pasted onto Desktop browser and vice-versa. 2020-11-30 07:34:50 -05:00
Brandon 248d0a2c02 Added ability to see if a sync code is valid. 2020-11-30 07:34:50 -05:00
Brandon 09b4fe2ca3 Addressing feedback and using properties instead of functions. 2020-11-30 07:34:50 -05:00