Save Chrome Windows & Tabs To Reopen Later

You might be able to use this macro as a starting point:

It says "Safari" in the Title, but it covers both Safari and Chrome.