Avoid creating BrowserThreadGlobals when we don't need to.
Avoid creating BrowserThreadGlobals when we don't need to.

In tessts, it is possible for BrowserThread static methods like
IsWellKnownThread to get called when no message loops exists. We can
infer the answer for many methods from the fact the globals are
NULL without having to construct them. (constructing them can have the
undesireable side effect in these cases of hitting DCHECK for
MessageLoop::current() in the SequencedWorkerPool constructor)

BUG=117940
TEST=out/Debug/unit_tests --gtest_filter=TemplateURLPrepopulateDataTest.ProvidersFromPrefs


Review URL: http://codereview.chromium.org/9696034

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@126626 0039d316-1c4b-4281-b951-d872f2087c98

adobe/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,adobe/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium