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
[email protected], [email protected], [email protected], [email protected]

Review URL: https://codereview.chromium.org/225403021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266197 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/services/gcm/gcm_client_mock.cc b/chrome/browser/services/gcm/gcm_client_mock.cc
index d924238..b894efa 100644
--- a/chrome/browser/services/gcm/gcm_client_mock.cc
+++ b/chrome/browser/services/gcm/gcm_client_mock.cc
@@ -143,7 +143,7 @@
 // static
 std::string GCMClientMock::GetRegistrationIdFromSenderIds(
     const std::vector<std::string>& sender_ids) {
-  // GCMProfileService normalizes the sender IDs by making them sorted.
+  // GCMService normalizes the sender IDs by making them sorted.
   std::vector<std::string> normalized_sender_ids = sender_ids;
   std::sort(normalized_sender_ids.begin(), normalized_sender_ids.end());