Extract Profile-independent GCMService from GCMProfileService
This CL moves most of the GCMProfileService functionality to a new
GCMService class that does not depend on Profile. GCMProfileService
becomes a subclass of GCMService that adds Profile-specific lifetime
management and control over the service via user preferences.
The CL is a prerequisite for Chrome OS device policy pushing, which will
need to instantiate a Tango connection using device-wide GAIA credentials
not tied to any user or Profile.
The CL also fixes a few subtle bugs, such as GCMProfileService::IOWorker
being shut down on the wrong thread and unit tests looking at the wrong
GCMProfileService when trying to verify correct behavior.
BUG=362083
TEST=Updated unit tests
R=atwilson@chromium.org, dcheng@chromium.org, jianli@chromium.org, yoz@chromium.org
Review URL: https://codereview.chromium.org/
225403021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266197 0039d316-1c4b-4281-b951-d872f2087c98