Refactor AO2TS to make it easier to componentize
commit63376b55f05201ea493fe6c26d3b9a8f26bc2f16
authorgogerald <gogerald@chromium.org>
Thu, 2 Jul 2015 20:03:47 +0000 (2 13:03 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 2 Jul 2015 20:04:23 +0000 (2 20:04 +0000)
tree97bbc087ac0b9cb8c7ba960ef749124180d9a67b
parent9997795a0ef93d1a1bab867ae2f1a21d3d55361c
Refactor AO2TS to make it easier to componentize

This cl is dedicated to refactor token service to make it easier to componentize. It introduces a new class OAuth2TokenServiceDelegate for each platform to implement it. OAuth2TokenService and its subclasses will call into platform specific delegate and the user can get that delegate through public interface GetDelegate() of OAuth2TokenService.

BUG=490882

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

Cr-Commit-Position: refs/heads/master@{#337248}
87 files changed:
chrome/android/java/src/org/chromium/chrome/browser/signin/OAuth2TokenService.java
chrome/browser/android/chrome_jni_registrar.cc
chrome/browser/android/signin/signin_manager_android.cc
chrome/browser/chromeos/policy/consumer_enrollment_handler_unittest.cc
chrome/browser/chromeos/policy/upload_job_impl.cc
chrome/browser/chromeos/policy/upload_job_unittest.cc
chrome/browser/chromeos/settings/device_oauth2_token_service.cc
chrome/browser/chromeos/settings/device_oauth2_token_service.h
chrome/browser/chromeos/settings/device_oauth2_token_service_delegate.cc [copied from chrome/browser/chromeos/settings/device_oauth2_token_service.cc with 58% similarity]
chrome/browser/chromeos/settings/device_oauth2_token_service_delegate.h [copied from chrome/browser/chromeos/settings/device_oauth2_token_service.h with 62% similarity]
chrome/browser/chromeos/settings/device_oauth2_token_service_factory.cc
chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc
chrome/browser/extensions/api/identity/identity_apitest.cc
chrome/browser/invalidation/gcm_invalidation_bridge_unittest.cc
chrome/browser/local_discovery/gcd_api_flow_unittest.cc
chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc
chrome/browser/signin/fake_profile_oauth2_token_service.cc
chrome/browser/signin/fake_profile_oauth2_token_service.h
chrome/browser/signin/fake_profile_oauth2_token_service_builder.cc
chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.cc [moved from components/signin/core/browser/mutable_profile_oauth2_token_service.cc with 71% similarity]
chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.h [moved from components/signin/core/browser/mutable_profile_oauth2_token_service.h with 67% similarity]
chrome/browser/signin/mutable_profile_oauth2_token_service_delegate_unittest.cc [moved from components/signin/core/browser/mutable_profile_oauth2_token_service_unittest.cc with 60% similarity]
chrome/browser/signin/oauth2_token_service_delegate_android.cc [moved from chrome/browser/signin/android_profile_oauth2_token_service.cc with 69% similarity]
chrome/browser/signin/oauth2_token_service_delegate_android.h [moved from chrome/browser/signin/android_profile_oauth2_token_service.h with 77% similarity]
chrome/browser/signin/profile_oauth2_token_service_factory.cc
chrome/browser/signin/profile_oauth2_token_service_factory.h
chrome/browser/signin/signin_tracker_unittest.cc
chrome/browser/supervised_user/child_accounts/family_info_fetcher.cc
chrome/browser/supervised_user/child_accounts/family_info_fetcher_unittest.cc
chrome/browser/supervised_user/child_accounts/permission_request_creator_apiary.cc
chrome/browser/supervised_user/child_accounts/permission_request_creator_apiary_unittest.cc
chrome/browser/supervised_user/legacy/supervised_user_refresh_token_fetcher.cc
chrome/browser/supervised_user/legacy/supervised_user_refresh_token_fetcher_unittest.cc
chrome/browser/sync/profile_sync_auth_provider.cc
chrome/browser/sync/profile_sync_auth_provider_unittest.cc
chrome/browser/sync/profile_sync_service.cc
chrome/browser/sync/startup_controller_unittest.cc
chrome/browser/ui/app_list/speech_auth_helper_unittest.cc
chrome/browser/ui/ash/user_accounts_delegate_chromeos.cc
chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
chrome/browser/ui/views/profiles/profile_chooser_view.cc
chrome/chrome_browser.gypi
chrome/chrome_browser_chromeos.gypi
chrome/chrome_tests_unit.gypi
chrome/test/base/testing_profile.cc
components/autofill/core/browser/wallet/real_pan_wallet_client.cc
components/components_tests.gyp
components/history/core/browser/web_history_service.cc
components/invalidation/impl/gcm_invalidation_bridge.cc
components/invalidation/impl/ticl_invalidation_service.cc
components/signin.gypi
components/signin/core/browser/BUILD.gn
components/signin/core/browser/profile_oauth2_token_service.cc
components/signin/core/browser/profile_oauth2_token_service.h
components/signin/ios/browser/BUILD.gn
components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.h [moved from components/signin/ios/browser/profile_oauth2_token_service_ios.h with 72% similarity]
components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.mm [moved from components/signin/ios/browser/profile_oauth2_token_service_ios.mm with 78% similarity]
components/signin/ios/browser/profile_oauth2_token_service_ios_delegate_unittest.mm [new file with mode: 0644]
components/signin/ios/browser/profile_oauth2_token_service_ios_unittest.mm [deleted file]
extensions/browser/updater/extension_downloader.cc
extensions/shell/app_shell.gypi
extensions/shell/browser/api/identity/identity_api.cc
extensions/shell/browser/shell_oauth2_token_service.cc
extensions/shell/browser/shell_oauth2_token_service.h
extensions/shell/browser/shell_oauth2_token_service_delegate.cc [new file with mode: 0644]
extensions/shell/browser/shell_oauth2_token_service_delegate.h [new file with mode: 0644]
extensions/shell/browser/shell_oauth2_token_service_unittest.cc
google_apis/BUILD.gn
google_apis/gaia/fake_oauth2_token_service.cc
google_apis/gaia/fake_oauth2_token_service.h
google_apis/gaia/fake_oauth2_token_service_delegate.cc [new file with mode: 0644]
google_apis/gaia/fake_oauth2_token_service_delegate.h [new file with mode: 0644]
google_apis/gaia/oauth2_token_service.cc
google_apis/gaia/oauth2_token_service.h
google_apis/gaia/oauth2_token_service_delegate.cc [new file with mode: 0644]
google_apis/gaia/oauth2_token_service_delegate.h [new file with mode: 0644]
google_apis/gaia/oauth2_token_service_request.cc
google_apis/gaia/oauth2_token_service_request_unittest.cc
google_apis/gaia/oauth2_token_service_unittest.cc
google_apis/gaia/ubertoken_fetcher.cc
google_apis/google_apis.gyp
ios/chrome/browser/enhanced_bookmarks/bookmark_server_cluster_service_factory.cc
ios/public/provider/chrome/browser/keyed_service_provider.h
ios/public/test/test_keyed_service_provider.cc
ios/public/test/test_keyed_service_provider.h
sync/internal_api/attachments/attachment_downloader_impl_unittest.cc
sync/internal_api/attachments/attachment_uploader_impl_unittest.cc