Last year, Starbucks Corp. also told customers that guns were no longer welcome in its cafes after it had to temporarily close a store in Newtown, Conn., to avoid a demonstration by gun-rights advocates. The company said it shut down the store out of respect for the community, where 20 school children and six educators had been slain.

The Seattle-based coffee chain stopped short of a ban, however, saying it didn’t want to put its workers in the position of having to ask people carrying guns to leave its stores. Its carefully worded decision also underscored how major companies need to walk a fine line on highly divisive political issues