| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/cryptauth/chrome_cryptauth_service.h" | 5 #include "chrome/browser/cryptauth/chrome_cryptauth_service.h" |
| 6 | 6 |
| 7 #include "base/guid.h" | 7 #include "base/guid.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/sys_info.h" | 9 #include "base/sys_info.h" |
| 10 #include "base/time/default_clock.h" | 10 #include "base/time/default_clock.h" |
| 11 #include "base/version.h" | 11 #include "base/version.h" |
| 12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
| 13 #include "chrome/browser/chrome_content_browser_client.h" | 13 #include "chrome/browser/chrome_content_browser_client.h" |
| 14 #include "chrome/browser/chromeos/login/easy_unlock/secure_message_delegate_chro
meos.h" | |
| 15 #include "chrome/browser/gcm/gcm_profile_service_factory.h" | 14 #include "chrome/browser/gcm/gcm_profile_service_factory.h" |
| 16 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 17 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 16 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 18 #include "chrome/browser/signin/signin_manager_factory.h" | 17 #include "chrome/browser/signin/signin_manager_factory.h" |
| 19 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
| 20 #include "components/cryptauth/cryptauth_client.h" | 19 #include "components/cryptauth/cryptauth_client.h" |
| 21 #include "components/cryptauth/cryptauth_client_impl.h" | 20 #include "components/cryptauth/cryptauth_client_impl.h" |
| 22 #include "components/cryptauth/cryptauth_device_manager.h" | 21 #include "components/cryptauth/cryptauth_device_manager.h" |
| 23 #include "components/cryptauth/cryptauth_enroller.h" | 22 #include "components/cryptauth/cryptauth_enroller.h" |
| 24 #include "components/cryptauth/cryptauth_enroller_impl.h" | 23 #include "components/cryptauth/cryptauth_enroller_impl.h" |
| 25 #include "components/cryptauth/cryptauth_enrollment_manager.h" | 24 #include "components/cryptauth/cryptauth_enrollment_manager.h" |
| 26 #include "components/cryptauth/cryptauth_enrollment_utils.h" | 25 #include "components/cryptauth/cryptauth_enrollment_utils.h" |
| 27 #include "components/cryptauth/cryptauth_gcm_manager_impl.h" | 26 #include "components/cryptauth/cryptauth_gcm_manager_impl.h" |
| 28 #include "components/cryptauth/proto/cryptauth_api.pb.h" | 27 #include "components/cryptauth/proto/cryptauth_api.pb.h" |
| 29 #include "components/cryptauth/secure_message_delegate.h" | 28 #include "components/cryptauth/secure_message_delegate.h" |
| 30 #include "components/gcm_driver/gcm_profile_service.h" | 29 #include "components/gcm_driver/gcm_profile_service.h" |
| 31 #include "components/prefs/pref_service.h" | 30 #include "components/prefs/pref_service.h" |
| 32 #include "components/proximity_auth/logging/logging.h" | 31 #include "components/proximity_auth/logging/logging.h" |
| 33 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 32 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
| 34 #include "components/signin/core/browser/signin_manager.h" | 33 #include "components/signin/core/browser/signin_manager.h" |
| 35 #include "components/translate/core/browser/translate_download_manager.h" | 34 #include "components/translate/core/browser/translate_download_manager.h" |
| 36 #include "components/version_info/version_info.h" | 35 #include "components/version_info/version_info.h" |
| 37 | 36 |
| 38 #if defined(OS_CHROMEOS) | 37 #if defined(OS_CHROMEOS) |
| 39 #include "ash/shell.h" | 38 #include "ash/shell.h" |
| 40 #include "base/linux_util.h" | 39 #include "base/linux_util.h" |
| 40 #include "chrome/browser/chromeos/login/easy_unlock/secure_message_delegate_chro
meos.h" |
| 41 #include "ui/display/manager/display_manager.h" | 41 #include "ui/display/manager/display_manager.h" |
| 42 #include "ui/display/manager/managed_display_info.h" | 42 #include "ui/display/manager/managed_display_info.h" |
| 43 #include "ui/gfx/geometry/rect.h" | 43 #include "ui/gfx/geometry/rect.h" |
| 44 #endif | 44 #endif |
| 45 | 45 |
| 46 namespace { | 46 namespace { |
| 47 | 47 |
| 48 PrefService* GetLocalState() { | 48 PrefService* GetLocalState() { |
| 49 return g_browser_process ? g_browser_process->local_state() : nullptr; | 49 return g_browser_process ? g_browser_process->local_state() : nullptr; |
| 50 } | 50 } |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 } | 269 } |
| 270 | 270 |
| 271 void ChromeCryptAuthService::OnRefreshTokenAvailable( | 271 void ChromeCryptAuthService::OnRefreshTokenAvailable( |
| 272 const std::string& account_id) { | 272 const std::string& account_id) { |
| 273 if (account_id == GetAccountId()) { | 273 if (account_id == GetAccountId()) { |
| 274 token_service_->RemoveObserver(this); | 274 token_service_->RemoveObserver(this); |
| 275 enrollment_manager_->Start(); | 275 enrollment_manager_->Start(); |
| 276 device_manager_->Start(); | 276 device_manager_->Start(); |
| 277 } | 277 } |
| 278 } | 278 } |
| OLD | NEW |