Skip to content
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

clarify/document what mainDevice is #201

Open
diracdeltas opened this issue Apr 11, 2018 · 1 comment
Open

clarify/document what mainDevice is #201

diracdeltas opened this issue Apr 11, 2018 · 1 comment

Comments

@diracdeltas
Copy link
Member

@diracdeltas diracdeltas commented Apr 11, 2018

browser-laptop implements the concept of a main device for sync: https://github.com/brave/browser-laptop/pull/13197/files#diff-23ca389e2bcb77191b5a9c10900eb3a3R559

my understanding is that the main device is the device that, when deleted, sends DELETE_SYNC_USER to the sync server, thereby deleting the entire sync profile on the server.

according to https://github.com/brave/browser-laptop/pull/13197/files#diff-23ca389e2bcb77191b5a9c10900eb3a3R568, the algorithm for determining if a device is a main device is:

  1. fetch all devices from the server and save them to local state
  2. are any devices already marked as a mainDevice? if so, abort
  3. iterate through all the devices and mark any device with the same name as the current device to be a mainDevice.

the sync server has no understanding of main devices; this is only used on the clients. also note that there can be more than one main device according to the algorithm above.

@bryan-snyder
Copy link

@bryan-snyder bryan-snyder commented Sep 25, 2018

this is another great idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.