Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd FETCH_SYNC_DEVICES to get all device records #71
+26
−5
Conversation
ayumi
added a commit
to brave/browser-laptop
that referenced
this pull request
Apr 7, 2017
Requires brave/sync#71 Fixes brave/sync#41 Test plan: 1. Start Brave and enable Sync, naming the device "Pyramid 1". 2. `npm run start2` Brave and add it to Pyramid 1's Sync profile and name it "Pyramid 2". 3. Pyramid 2's device list should show both pyramids. 4. In Pyramid 1, wait a bit, 30-60s. 5. Pyramid 1's device list should also show both pyramids.
client/constants/messages.js
Outdated
| @@ -54,6 +54,12 @@ const messages = { | |||
| FETCH_SYNC_RECORDS: _, /* @param Array.<string> categoryNames, @param {number} startAt (in seconds or milliseconds), @param {boolean=} limitResponse true to limit response to 1000 records */ | |||
| /** | |||
| * webview -> browser | |||
| * sent to fetch all sync devices. webview responds with | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
client/sync.js
Outdated
| }) | ||
| const lastObject = s3Objects[s3Objects.length - 1] | ||
| const lastRecordTimestamp = s3Helper.parseS3Key(lastObject.Key).timestamp | ||
| ipc.send(messages.GET_EXISTING_OBJECTS, 'PREFERENCES', jsRecords, lastRecordTimestamp) |
This comment has been minimized.
This comment has been minimized.
diracdeltas
Apr 7, 2017
Member
it makes slightly more sense to me if this were RESOLVED_SYNC_RECORDS instead of GET_EXISTING_OBJECTS, since sync doesn't appear to need or use the existing objects in this case.
|
see above |
1dc45da
to
e16af29
|
@diracdeltas made some changes– can you re-review? |
client/constants/messages.js
Outdated
| @@ -54,6 +54,12 @@ const messages = { | |||
| FETCH_SYNC_RECORDS: _, /* @param Array.<string> categoryNames, @param {number} startAt (in seconds or milliseconds), @param {boolean=} limitResponse true to limit response to 1000 records */ | |||
| /** | |||
| * webview -> browser | |||
| * sent to fetch all sync devices. webview responds with | |||
This comment has been minimized.
This comment has been minimized.
client/constants/messages.js
Outdated
| @@ -53,6 +53,12 @@ const messages = { | |||
| */ | |||
| FETCH_SYNC_RECORDS: _, /* @param Array.<string> categoryNames, @param {number} startAt (in seconds or milliseconds), @param {boolean=} limitResponse true to limit response to 1000 records */ | |||
| /** | |||
| * browser -> webview | |||
| * sent to fetch all sync devices. webview responds with | |||
| * GET_EXISTING_OBJECTS etc, as in FETCH_SYNC_RECORDS. | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ayumi
added a commit
to brave/browser-laptop
that referenced
this pull request
Apr 10, 2017
Requires brave/sync#71 Fixes brave/sync#41 Test plan: 1. Start Brave and enable Sync, naming the device "Pyramid 1". 2. `npm run start2` Brave and add it to Pyramid 1's Sync profile and name it "Pyramid 2". 3. Pyramid 2's device list should show both pyramids. 4. In Pyramid 1, wait a bit, 30-60s. 5. Pyramid 1's device list should also show both pyramids.
ayumi
added a commit
to brave/browser-laptop
that referenced
this pull request
Apr 11, 2017
Requires brave/sync#71 Fixes brave/sync#41 Test plan: 1. Start Brave and enable Sync, naming the device "Pyramid 1". 2. `npm run start2` Brave and add it to Pyramid 1's Sync profile and name it "Pyramid 2". 3. Pyramid 2's device list should show both pyramids. 4. In Pyramid 1, wait a bit, 30-60s. 5. Pyramid 1's device list should also show both pyramids.
ayumi
added a commit
to brave/browser-laptop
that referenced
this pull request
Apr 11, 2017
Requires brave/sync#71 Fixes brave/sync#41 Test plan: 1. Start Brave and enable Sync, naming the device "Pyramid 1". 2. `npm run start2` Brave and add it to Pyramid 1's Sync profile and name it "Pyramid 2". 3. Pyramid 2's device list should show both pyramids. 4. In Pyramid 1, wait a bit, 30-60s. 5. Pyramid 1's device list should also show both pyramids.
ayumi
added a commit
to brave/browser-laptop
that referenced
this pull request
Apr 11, 2017
Requires brave/sync#71 Fixes brave/sync#41 Test plan: 1. Start Brave and enable Sync, naming the device "Pyramid 1". 2. `npm run start2` Brave and add it to Pyramid 1's Sync profile and name it "Pyramid 2". 3. Pyramid 2's device list should show both pyramids. 4. In Pyramid 1, wait a bit, 30-60s. 5. Pyramid 1's device list should also show both pyramids.
bsclifton
added a commit
to brave/browser-laptop
that referenced
this pull request
Apr 11, 2017
Requires brave/sync#71 Fixes brave/sync#41 Test plan: 1. Start Brave and enable Sync, naming the device "Pyramid 1". 2. `npm run start2` Brave and add it to Pyramid 1's Sync profile and name it "Pyramid 2". 3. Pyramid 2's device list should show both pyramids. 4. In Pyramid 1, wait a bit, 30-60s. 5. Pyramid 1's device list should also show both pyramids.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ayumi commentedApr 7, 2017
to support #41
Browser requests FETCH_SYNC_DEVICES when toggling sync from off -> on
It's a rebranded FETCH_SYNC_RECORDS which returns device records from all time (responses go through the existing down stream, GET_EXISTING_OBJECTS etc)