-
Notifications
You must be signed in to change notification settings - Fork 900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync #226
Merged
Merged
Sync #226
Changes from all commits
Commits
Show all changes
97 commits
Select commit
Hold shift + click to select a range
5f72a3e
WIP branch. Rebasing Brave-sync to Chromium69
AlexeyBarabash 8587c52
add sync extension to typescript exclusion list
cezaraugusto 42c69ca
set sync to be locale-ready
cezaraugusto 5b2e4db
Pass base bookmark order when id == -1
darkdh a8461a0
can send created bookmarks with order after sync initialization when …
AlexeyBarabash 4732630
Propagate parentFolderID correctly when
darkdh fd9df0c
Make sure each bookmark is processed and save to object id map before
darkdh aeea601
removed some not actual TODOs
AlexeyBarabash e229cbd
Cleanup
darkdh 50f549e
Pass weakptr for same sequence post task in ControllerImpl
darkdh 4f0689e
modified brave-crypto DEPS '0.1.0'->'0.2.0'
AlexeyBarabash bd568a9
Fix BookmarkNodeRemoved for folder deletion
darkdh 10b5157
controller -> brave_sync_service
bridiver f4e72bb
more service, dep and thread cleanup
bridiver 43b904b
fix device not being removed
cezaraugusto 2e20c79
properly initialize BraveSyncClientFactory
bridiver c47615c
make sure all leveldb operations happen on the same thread
bridiver 454037e
sync_client -> brave_sync_client to match actual class name
bridiver e18a8b5
fixes according to codereview notices
AlexeyBarabash a122377
not synced records re-send support
AlexeyBarabash 44adf0c
removed testing constant parameter
AlexeyBarabash 07cd6a5
improve generateQRCodeImageSource
cezaraugusto c4d346e
set `sync this device` and all sync data to return if input is undefined
cezaraugusto 3f4d621
cleaned logging on extension background page
AlexeyBarabash 465da0c
fixed delete operation with unsynced items
AlexeyBarabash 879144e
Load/Unload sync extension based on the value of kSyncThisDeviceEnabled
darkdh 11b9f2f
workaround to use C++ sync words => bytes conversion
AlexeyBarabash fb830cc
fixed send remove device record
AlexeyBarabash 3a3a6b9
reset sync by device itself if deleted from other
AlexeyBarabash 05a2ff5
updated DEPS to the latest brave/sync lib
AlexeyBarabash 9ea0ab2
convert to bookmark meta info
bridiver d93864b
use sync_timestamp to identify unsynced bookmarks
bridiver 297f025
fix shutdown destruction for sync_object_map_
bridiver 6758726
get device resolving and fetch on latest record timestamp back
AlexeyBarabash 2254893
Save seed only from SAVE_INIT_DATA also remove temp storage
darkdh 95d54f5
Init SyncService in DoFinalInitForServices when sync is configured
darkdh c879d42
set sync_timestamp in resolve
bridiver 7254c74
1. Fix next_node calculation when node is the last item, GetChild(ind…
darkdh 4b00aeb
fix typo and resulting DCHECK error
bridiver 9db1086
Start/stop loop by extension reday/unloaded
darkdh 3717e4f
add parent_order for calculating get order api
bridiver fe40545
parentOrder parameter for get/save bookmark order in background page
AlexeyBarabash b96b6eb
add parentNode to callback
bridiver 8c4a7c7
Send sync records at the end of bookmarks iterating
darkdh e87c5a6
fix weakptr sequence checker crash
bridiver b860a91
stop the loop on shutdown
bridiver 7cc9f96
Monitor kSyncThisDeviceEnabled change by PrefChangeRegistrar
darkdh 4a45763
lint and other cleanup
bridiver 29c212c
Fix unsynchronized data between prefs and webui settings
darkdh 2cff586
more lint and cleanup
bridiver 10f1b29
cleanup pref names
bridiver fe4b7d9
use prefs for devices
bridiver f561314
temporarily set sync_version back to 0
bridiver bf9eead
devices -> sync_devices to match class name
bridiver e7d158e
these aren't necessary anymore, we only need checks on public method …
bridiver 5b66731
clear out history stuff for now because we want to look at a differen…
bridiver cb88944
add missing sync_devices
bridiver d2a69e1
sync_client shouldn't be a keyed service
bridiver 1059ad9
don't need weak ptr anymore
bridiver 41773b2
cleanup deps
bridiver 05c7003
refactor bookmarks into BookmarkChangeProcessor
bridiver 10e6176
add change processor interface to start bringing things in line with …
bridiver d8547c6
updated DEPS for brave-sync lib to its main branch after merge branch PR
AlexeyBarabash 355896c
Implement FETCH_SYNC_DEVICES so that when "sync site setting" toggle …
darkdh 9a49882
Prevent users from turning on history, site settings until they are
darkdh 6ab5f74
NotifySyncStateChanged cleanup
darkdh 5c94f4a
wip sync unit test; can run test 1
AlexeyBarabash 0dd5cf2
refactor classes to cleanup test setup code
bridiver 3641710
add some missing assertions
bridiver 8de0f46
fix rebase issues
bridiver 3d5e794
updated brave sync lib DEPS
AlexeyBarabash 5995298
pausing observer while applying changes from sync
AlexeyBarabash 68b7355
fix finding of parent when updating
bridiver 50e139a
we're skipping the observer method so these bookmarks should already …
bridiver ac2db42
pause the sync loop when waiting for an order response so new records…
bridiver 95d310b
try to avoid overwriting remote sync data with unchanged local data
bridiver 2f348a5
this seems more reliable
bridiver c144627
cleanup
bridiver 14063af
Don't put changes records from sync model to unsync lists
darkdh 3682708
bookmark_change_processor_unittest; matcher for send record; sync cli…
AlexeyBarabash cdf4306
cleanup
AlexeyBarabash 6480555
don't keep static vars for per-profile attributes
bridiver 28062ef
fixing tests
AlexeyBarabash a4f6851
Obtain order when "SEND_SYNC_RECORDS" and "RESOLVE_SYNC_RECORDS" to s…
darkdh fa33db2
cleaned some unused code
AlexeyBarabash b7d740f
more bookmark_change_processor tests
AlexeyBarabash c1f5e79
clearing order for shifted nodes when moving
darkdh 03a2a79
Fix syncTimestamp propagation
darkdh 1f1aff4
added new and adapted existing test to new resolve records way
AlexeyBarabash 33af016
GetTaskRunnerForThread removal (C71 upgrade)
darkdh 753b75b
more BraveSyncService tests
AlexeyBarabash d7823ab
command line key to enable use of sync, disabled by default
AlexeyBarabash cf5f057
Address review comments
darkdh 045518d
ts lint
darkdh eb93cac
removed BraveSyncServiceObserver::OnLogMessage because it just sends …
AlexeyBarabash 30cd566
Fix build on Windows
darkdh c5853d8
fix of incorrect sync initialization with wrong code words
AlexeyBarabash File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* 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 http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "brave/browser/bookmarks/brave_bookmark_client.h" | ||
|
||
#include "brave/components/brave_sync/brave_sync_service.h" | ||
#include "chrome/browser/profiles/profile.h" | ||
#include "components/bookmarks/browser/bookmark_model.h" | ||
#include "components/bookmarks/managed/managed_bookmark_service.h" | ||
#include "components/sync_bookmarks/bookmark_sync_service.h" | ||
|
||
BraveBookmarkClient::BraveBookmarkClient( | ||
Profile* profile, | ||
bookmarks::ManagedBookmarkService* managed_bookmark_service, | ||
sync_bookmarks::BookmarkSyncService* bookmark_sync_service) | ||
: ChromeBookmarkClient(profile, | ||
managed_bookmark_service, | ||
bookmark_sync_service) {} | ||
|
||
bookmarks::LoadExtraCallback BraveBookmarkClient::GetLoadExtraNodesCallback() { | ||
return base::BindOnce(&brave_sync::LoadExtraNodes, | ||
ChromeBookmarkClient::GetLoadExtraNodesCallback()); | ||
} | ||
|
||
bool BraveBookmarkClient::IsPermanentNodeVisible( | ||
const bookmarks::BookmarkPermanentNode* node) { | ||
if (brave_sync::IsSyncManagedNode(node)) | ||
return false; // don't display sync managed nodes | ||
return ChromeBookmarkClient::IsPermanentNodeVisible(node); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* 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 http://mozilla.org/MPL/2.0/. */ | ||
|
||
#ifndef BRAVE_BROWSER_BOOKMARKS_BRAVE_BOOKMARK_CLIENT_H_ | ||
#define BRAVE_BROWSER_BOOKMARKS_BRAVE_BOOKMARK_CLIENT_H_ | ||
|
||
#include "chrome/browser/bookmarks/chrome_bookmark_client.h" | ||
|
||
class BraveBookmarkClient : public ChromeBookmarkClient { | ||
public: | ||
BraveBookmarkClient( | ||
Profile* profile, | ||
bookmarks::ManagedBookmarkService* managed_bookmark_service, | ||
sync_bookmarks::BookmarkSyncService* bookmark_sync_service); | ||
|
||
bookmarks::LoadExtraCallback GetLoadExtraNodesCallback() override; | ||
bool IsPermanentNodeVisible( | ||
const bookmarks::BookmarkPermanentNode* node) override; | ||
|
||
private: | ||
DISALLOW_COPY_AND_ASSIGN(BraveBookmarkClient); | ||
}; | ||
|
||
#endif // BRAVE_BROWSER_BOOKMARKS_BRAVE_BOOKMARK_CLIENT_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we combine these scripts with
init-brave-extension.py
in a follow-up?