https://github.com/crosswalk-project/chromium-crosswalk/blob/master/chrome/common/chrome_content_client.cc#L507
could be a reference, content client is the right place to set default user agent.