Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Side by Side Diff: chrome/browser/signin/easy_unlock_service.cc

Issue 1269773002: Cleanup VersionInfo after componentization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/signin/easy_unlock_service.h" 5 #include "chrome/browser/signin/easy_unlock_service.h"
6 6
7 #include "apps/app_lifetime_monitor.h" 7 #include "apps/app_lifetime_monitor.h"
8 #include "apps/app_lifetime_monitor_factory.h" 8 #include "apps/app_lifetime_monitor_factory.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 12 matching lines...) Expand all
23 #include "chrome/browser/profiles/profile.h" 23 #include "chrome/browser/profiles/profile.h"
24 #include "chrome/browser/services/gcm/gcm_profile_service.h" 24 #include "chrome/browser/services/gcm/gcm_profile_service.h"
25 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" 25 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
26 #include "chrome/browser/signin/chrome_proximity_auth_client.h" 26 #include "chrome/browser/signin/chrome_proximity_auth_client.h"
27 #include "chrome/browser/signin/easy_unlock_app_manager.h" 27 #include "chrome/browser/signin/easy_unlock_app_manager.h"
28 #include "chrome/browser/signin/easy_unlock_service_factory.h" 28 #include "chrome/browser/signin/easy_unlock_service_factory.h"
29 #include "chrome/browser/signin/easy_unlock_service_observer.h" 29 #include "chrome/browser/signin/easy_unlock_service_observer.h"
30 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 30 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
31 #include "chrome/browser/signin/signin_manager_factory.h" 31 #include "chrome/browser/signin/signin_manager_factory.h"
32 #include "chrome/common/chrome_switches.h" 32 #include "chrome/common/chrome_switches.h"
33 #include "chrome/common/chrome_version_info.h"
34 #include "chrome/common/extensions/extension_constants.h" 33 #include "chrome/common/extensions/extension_constants.h"
35 #include "chrome/common/pref_names.h" 34 #include "chrome/common/pref_names.h"
36 #include "components/pref_registry/pref_registry_syncable.h" 35 #include "components/pref_registry/pref_registry_syncable.h"
37 #include "components/proximity_auth/ble/proximity_auth_ble_system.h" 36 #include "components/proximity_auth/ble/proximity_auth_ble_system.h"
38 #include "components/proximity_auth/cryptauth/cryptauth_client_impl.h" 37 #include "components/proximity_auth/cryptauth/cryptauth_client_impl.h"
39 #include "components/proximity_auth/cryptauth/cryptauth_device_manager.h" 38 #include "components/proximity_auth/cryptauth/cryptauth_device_manager.h"
40 #include "components/proximity_auth/cryptauth/cryptauth_enrollment_manager.h" 39 #include "components/proximity_auth/cryptauth/cryptauth_enrollment_manager.h"
41 #include "components/proximity_auth/cryptauth/secure_message_delegate.h" 40 #include "components/proximity_auth/cryptauth/secure_message_delegate.h"
42 #include "components/proximity_auth/screenlock_bridge.h" 41 #include "components/proximity_auth/screenlock_bridge.h"
43 #include "components/proximity_auth/switches.h" 42 #include "components/proximity_auth/switches.h"
44 #include "components/signin/core/browser/profile_oauth2_token_service.h" 43 #include "components/signin/core/browser/profile_oauth2_token_service.h"
45 #include "components/signin/core/browser/signin_manager.h" 44 #include "components/signin/core/browser/signin_manager.h"
46 #include "components/user_manager/user.h" 45 #include "components/user_manager/user.h"
46 #include "components/version_info/version_info.h"
47 #include "device/bluetooth/bluetooth_adapter.h" 47 #include "device/bluetooth/bluetooth_adapter.h"
48 #include "device/bluetooth/bluetooth_adapter_factory.h" 48 #include "device/bluetooth/bluetooth_adapter_factory.h"
49 49
50 #if defined(OS_CHROMEOS) 50 #if defined(OS_CHROMEOS)
51 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h" 51 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h"
52 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager. h" 52 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager. h"
53 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_ factory.h" 53 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_ factory.h"
54 #include "chrome/browser/chromeos/login/easy_unlock/secure_message_delegate_chro meos.h" 54 #include "chrome/browser/chromeos/login/easy_unlock/secure_message_delegate_chro meos.h"
55 #include "chrome/browser/chromeos/login/session/user_session_manager.h" 55 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
56 #include "chrome/browser/chromeos/profiles/profile_helper.h" 56 #include "chrome/browser/chromeos/profiles/profile_helper.h"
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 #if defined(OS_CHROMEOS) 670 #if defined(OS_CHROMEOS)
671 int32 major_version, minor_version, bugfix_version; 671 int32 major_version, minor_version, bugfix_version;
672 // TODO(tengs): base::OperatingSystemVersionNumbers only works for ChromeOS. 672 // TODO(tengs): base::OperatingSystemVersionNumbers only works for ChromeOS.
673 // We need to get different numbers for other platforms. 673 // We need to get different numbers for other platforms.
674 base::SysInfo::OperatingSystemVersionNumbers(&major_version, &minor_version, 674 base::SysInfo::OperatingSystemVersionNumbers(&major_version, &minor_version,
675 &bugfix_version); 675 &bugfix_version);
676 device_classifier.set_device_os_version_code(major_version); 676 device_classifier.set_device_os_version_code(major_version);
677 device_classifier.set_device_type(cryptauth::CHROME); 677 device_classifier.set_device_type(cryptauth::CHROME);
678 #endif 678 #endif
679 679
680 chrome::VersionInfo version_info;
681 const std::vector<uint32_t>& version_components = 680 const std::vector<uint32_t>& version_components =
682 base::Version(version_info.Version()).components(); 681 base::Version(version_info::GetVersionNumber()).components();
683 if (version_components.size() > 0) 682 if (version_components.size() > 0)
684 device_classifier.set_device_software_version_code(version_components[0]); 683 device_classifier.set_device_software_version_code(version_components[0]);
685 684
686 device_classifier.set_device_software_package(version_info.Name()); 685 device_classifier.set_device_software_package(version_info::GetProductName());
687 return device_classifier; 686 return device_classifier;
688 } 687 }
689 688
690 gcm::GCMDriver* EasyUnlockService::GetGCMDriver() { 689 gcm::GCMDriver* EasyUnlockService::GetGCMDriver() {
691 gcm::GCMProfileService* gcm_profile_service = 690 gcm::GCMProfileService* gcm_profile_service =
692 gcm::GCMProfileServiceFactory::GetForProfile(profile_); 691 gcm::GCMProfileServiceFactory::GetForProfile(profile_);
693 return gcm_profile_service->driver(); 692 return gcm_profile_service->driver();
694 } 693 }
695 694
696 void EasyUnlockService::Shutdown() { 695 void EasyUnlockService::Shutdown() {
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 942
944 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt 943 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt
945 // failed. 944 // failed.
946 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_) 945 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_)
947 ->PrepareTpmKey(true /* check_private_key */, 946 ->PrepareTpmKey(true /* check_private_key */,
948 base::Closure()); 947 base::Closure());
949 #endif // defined(OS_CHROMEOS) 948 #endif // defined(OS_CHROMEOS)
950 949
951 tpm_key_checked_ = true; 950 tpm_key_checked_ = true;
952 } 951 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/chrome_signin_client.cc ('k') | chrome/browser/supervised_user/supervised_user_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698