Extract Profile-independent GCMService from GCMProfileService
commitdf84c5378331d859148ad916a706fe2d9be441fd
authorbartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 25 Apr 2014 15:36:54 +0000 (25 15:36 +0000)
committerbartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 25 Apr 2014 15:36:54 +0000 (25 15:36 +0000)
treed18a4d4502bb65cadc8c310e471f5b9e0c00bd7c
parent671d33072bfcc49a6aeac7559d349e7bc0d994e9
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
25 files changed:
chrome/browser/extensions/extension_gcm_app_handler.h
chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
chrome/browser/invalidation/gcm_invalidation_bridge.cc
chrome/browser/invalidation/gcm_invalidation_bridge.h
chrome/browser/invalidation/ticl_invalidation_service.cc
chrome/browser/services/gcm/fake_gcm_client_factory.cc [new file with mode: 0644]
chrome/browser/services/gcm/fake_gcm_client_factory.h [new file with mode: 0644]
chrome/browser/services/gcm/fake_signin_manager.cc [new file with mode: 0644]
chrome/browser/services/gcm/fake_signin_manager.h [new file with mode: 0644]
chrome/browser/services/gcm/gcm_client_mock.cc
chrome/browser/services/gcm/gcm_profile_service.cc
chrome/browser/services/gcm/gcm_profile_service.h
chrome/browser/services/gcm/gcm_profile_service_factory.cc
chrome/browser/services/gcm/gcm_profile_service_factory.h
chrome/browser/services/gcm/gcm_profile_service_test_helper.cc [deleted file]
chrome/browser/services/gcm/gcm_profile_service_test_helper.h [deleted file]
chrome/browser/services/gcm/gcm_profile_service_unittest.cc
chrome/browser/services/gcm/gcm_service.cc [copied from chrome/browser/services/gcm/gcm_profile_service.cc with 57% similarity]
chrome/browser/services/gcm/gcm_service.h [copied from chrome/browser/services/gcm/gcm_profile_service.h with 62% similarity]
chrome/browser/services/gcm/gcm_service_unittest.cc [new file with mode: 0644]
chrome/browser/signin/profile_identity_provider.cc
chrome/chrome_browser.gypi
chrome/chrome_tests_unit.gypi
sync/notifier/gcm_network_channel.h
sync/notifier/gcm_network_channel_delegate.h