I think that the best approach would be do have a warning as default, except from in "Incognito" mode - that way, people who feel a need to quickly close the browser can use Incognito mode or disable the warning and the rest of us avoid troublesome accidental closing of the browser.