I tried something like this and it did work partially:
let request = new clientToServerRequest.rootProto.ClientToServerMessage({
share: db.getUserShare(),
message_contents: 'COMMIT',
commit: {
config_params: {
enabled_type_ids: [50119],
tabs_datatype_enabled: true
},
entries: [{
name: websiteUrl, // shouldn't be important although must be filled
non_unique_name: websiteUrl,
// it's only 13 digits in JS in comparison to 16 used by chrome, hence the multiplication...
version: currentTime * 1000,
// id_string should uniquely identify the session tab -> I need to find the id_string of current tab via update request for example...
id_string: 'Z:ADqtAZxYtpOdmzFl4Fx/ECWEY2U2xytR+HKbgS6Ud13Bb9BHEPoxUw13MrSWNggmBakjrFWFtkZvaCM9eYPsYvwo8D1I1hlzWw==',
specifics: {
"session": {
"tab": {
"navigation": [
{
"title": "Title of the new page I opened in the tab",
}
],
// tab which I want to push this new thing to
"tab_id": 1027,
"window_id": 637
},
}
}
}]
}
)};
The problem with this is that after using it a couple of times the whole chrome sync stopped working. It means that even if I open some new tabs in chrome, it doesn't "record" them (any query for the open tabs returns me the same result no matter how many new tabs I already opened).
On the other hand, it sure does update the latest open tab (=the latest opened tab is the one added with this function - FOO.HTML), but it still does not change the old tabs even if I use chrome regularly.
When I tried it on a different account it didn't update the newest tab, but at least didn't blow the sync service up (when I browsed with chrome, the new tabs I opened were updated)...
What am I missing on this funcion, that it doesn't work properly?
Thank you.