Under pressure from shareholder resolutions demanding more accountability, most major companies in recent years have adopted official corporate policies about spending on campaign contributions and elections.