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

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

Issue 1102473003: Unlock Chrome when a phone with Smart Lock service is found. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_screen_lock
Patch Set: Nits Created 5 years, 7 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
« no previous file with comments | « no previous file | components/proximity_auth.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 } 633 }
634 634
635 void EasyUnlockService::UpdateAppState() { 635 void EasyUnlockService::UpdateAppState() {
636 if (IsAllowed()) { 636 if (IsAllowed()) {
637 EnsureTpmKeyPresentIfNeeded(); 637 EnsureTpmKeyPresentIfNeeded();
638 app_manager_->LoadApp(); 638 app_manager_->LoadApp();
639 NotifyUserUpdated(); 639 NotifyUserUpdated();
640 640
641 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 641 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
642 proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery) && 642 proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery) &&
643 GetType() == EasyUnlockService::TYPE_REGULAR &&
643 !proximity_auth_ble_system_) { 644 !proximity_auth_ble_system_) {
644 proximity_auth_ble_system_.reset( 645 proximity_auth_ble_system_.reset(
645 new proximity_auth::ProximityAuthBleSystem()); 646 new proximity_auth::ProximityAuthBleSystem(
647 GetScreenlockBridgeInstance(), profile_));
646 } 648 }
647 649
648 #if defined(OS_CHROMEOS) 650 #if defined(OS_CHROMEOS)
649 if (!power_monitor_) 651 if (!power_monitor_)
650 power_monitor_.reset(new PowerMonitor(this)); 652 power_monitor_.reset(new PowerMonitor(this));
651 #endif 653 #endif
652 } else { 654 } else {
653 bool bluetooth_waking_up = false; 655 bool bluetooth_waking_up = false;
654 #if defined(OS_CHROMEOS) 656 #if defined(OS_CHROMEOS)
655 // If the service is not allowed due to bluetooth not being detected just 657 // If the service is not allowed due to bluetooth not being detected just
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 861
860 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt 862 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt
861 // failed. 863 // failed.
862 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_) 864 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_)
863 ->PrepareTpmKey(true /* check_private_key */, 865 ->PrepareTpmKey(true /* check_private_key */,
864 base::Closure()); 866 base::Closure());
865 #endif // defined(OS_CHROMEOS) 867 #endif // defined(OS_CHROMEOS)
866 868
867 tpm_key_checked_ = true; 869 tpm_key_checked_ = true;
868 } 870 }
OLDNEW
« no previous file with comments | « no previous file | components/proximity_auth.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698