Why does the Chrome extension require new permissions?

Version 3.2013.12.31 of the Chrome extension (and later) introduces a new capability: when you create a draft message and Chrome launches, it will attempt to re-use the existing Gmail tab for the account in question and won’t force a complete reload of the page.

To do this, the extension requires the following permissions:

  • Tabs – this isn’t new, previous versions of the extension also required this. We need this permission to look at the tabs you’ve got open;
  • Browsing History – this is new, and is because we sometimes need to do a quick web address change on the Gmail tab before getting it to show the draft message. The change removes “?shva=1″ from the web address if it’s there. Not doing this means that the whole page reloads just to show the draft, whereas doing this makes the new message just pop up in the corner and provides a smoother experience. For any technically-minded people, we do a history.push() to make this happen.