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

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

Issue 1264703003: Implement debugging local unlock keys in chrome://proximity-auth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 chrome::VersionInfo version_info; 680 chrome::VersionInfo version_info;
681 const std::vector<uint32_t>& version_components = 681 const std::vector<uint32_t>& version_components =
682 base::Version(version_info.Version()).components(); 682 base::Version(version_info.Version()).components();
683 if (version_components.size() > 0) 683 if (version_components.size() > 0)
684 device_classifier.set_device_software_version_code(version_components[0]); 684 device_classifier.set_device_software_version_code(version_components[0]);
685 685
686 device_classifier.set_device_software_package(version_info.Name()); 686 device_classifier.set_device_software_package(version_info.Name());
687 return device_classifier; 687 return device_classifier;
688 } 688 }
689 689
690 std::string EasyUnlockService::GetAccountId() {
691 return SigninManagerFactory::GetForProfile(profile())
692 ->GetAuthenticatedAccountId();
693 }
694
690 gcm::GCMDriver* EasyUnlockService::GetGCMDriver() { 695 gcm::GCMDriver* EasyUnlockService::GetGCMDriver() {
691 gcm::GCMProfileService* gcm_profile_service = 696 gcm::GCMProfileService* gcm_profile_service =
692 gcm::GCMProfileServiceFactory::GetForProfile(profile_); 697 gcm::GCMProfileServiceFactory::GetForProfile(profile_);
693 return gcm_profile_service->driver(); 698 return gcm_profile_service->driver();
694 } 699 }
695 700
696 void EasyUnlockService::Shutdown() { 701 void EasyUnlockService::Shutdown() {
697 if (shut_down_) 702 if (shut_down_)
698 return; 703 return;
699 shut_down_ = true; 704 shut_down_ = true;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 948
944 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt 949 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt
945 // failed. 950 // failed.
946 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_) 951 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_)
947 ->PrepareTpmKey(true /* check_private_key */, 952 ->PrepareTpmKey(true /* check_private_key */,
948 base::Closure()); 953 base::Closure());
949 #endif // defined(OS_CHROMEOS) 954 #endif // defined(OS_CHROMEOS)
950 955
951 tpm_key_checked_ = true; 956 tpm_key_checked_ = true;
952 } 957 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698