| OLD | NEW |
| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 return NULL; | 75 return NULL; |
| 76 return EasyUnlockService::Get(profile); | 76 return EasyUnlockService::Get(profile); |
| 77 #else | 77 #else |
| 78 return NULL; | 78 return NULL; |
| 79 #endif | 79 #endif |
| 80 } | 80 } |
| 81 | 81 |
| 82 // static | 82 // static |
| 83 bool EasyUnlockService::IsSignInEnabled() { | 83 bool EasyUnlockService::IsSignInEnabled() { |
| 84 return !CommandLine::ForCurrentProcess()->HasSwitch( | 84 return !CommandLine::ForCurrentProcess()->HasSwitch( |
| 85 proximity_auth::switches::kDisableEasySignin); | 85 proximity_auth::switches::kDisableEasyUnlock); |
| 86 } | 86 } |
| 87 | 87 |
| 88 class EasyUnlockService::BluetoothDetector | 88 class EasyUnlockService::BluetoothDetector |
| 89 : public device::BluetoothAdapter::Observer { | 89 : public device::BluetoothAdapter::Observer { |
| 90 public: | 90 public: |
| 91 explicit BluetoothDetector(EasyUnlockService* service) | 91 explicit BluetoothDetector(EasyUnlockService* service) |
| 92 : service_(service), | 92 : service_(service), |
| 93 weak_ptr_factory_(this) { | 93 weak_ptr_factory_(this) { |
| 94 } | 94 } |
| 95 | 95 |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 } | 663 } |
| 664 #endif | 664 #endif |
| 665 | 665 |
| 666 void EasyUnlockService::PrepareForSuspend() { | 666 void EasyUnlockService::PrepareForSuspend() { |
| 667 DisableAppIfLoaded(); | 667 DisableAppIfLoaded(); |
| 668 if (screenlock_state_handler_ && screenlock_state_handler_->IsActive()) { | 668 if (screenlock_state_handler_ && screenlock_state_handler_->IsActive()) { |
| 669 UpdateScreenlockState( | 669 UpdateScreenlockState( |
| 670 EasyUnlockScreenlockStateHandler::STATE_BLUETOOTH_CONNECTING); | 670 EasyUnlockScreenlockStateHandler::STATE_BLUETOOTH_CONNECTING); |
| 671 } | 671 } |
| 672 } | 672 } |
| OLD | NEW |