| 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/extensions/api/easy_unlock_private/easy_unlock_private_
api.h" | 5 #include "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_
api.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 case easy_unlock_private::STATE_NO_PHONE: | 53 case easy_unlock_private::STATE_NO_PHONE: |
| 54 return EasyUnlockScreenlockStateHandler::STATE_NO_PHONE; | 54 return EasyUnlockScreenlockStateHandler::STATE_NO_PHONE; |
| 55 case easy_unlock_private::STATE_PHONE_NOT_AUTHENTICATED: | 55 case easy_unlock_private::STATE_PHONE_NOT_AUTHENTICATED: |
| 56 return EasyUnlockScreenlockStateHandler::STATE_PHONE_NOT_AUTHENTICATED; | 56 return EasyUnlockScreenlockStateHandler::STATE_PHONE_NOT_AUTHENTICATED; |
| 57 case easy_unlock_private::STATE_PHONE_LOCKED: | 57 case easy_unlock_private::STATE_PHONE_LOCKED: |
| 58 return EasyUnlockScreenlockStateHandler::STATE_PHONE_LOCKED; | 58 return EasyUnlockScreenlockStateHandler::STATE_PHONE_LOCKED; |
| 59 case easy_unlock_private::STATE_PHONE_UNLOCKABLE: | 59 case easy_unlock_private::STATE_PHONE_UNLOCKABLE: |
| 60 return EasyUnlockScreenlockStateHandler::STATE_PHONE_UNLOCKABLE; | 60 return EasyUnlockScreenlockStateHandler::STATE_PHONE_UNLOCKABLE; |
| 61 case easy_unlock_private::STATE_PHONE_NOT_NEARBY: | 61 case easy_unlock_private::STATE_PHONE_NOT_NEARBY: |
| 62 return EasyUnlockScreenlockStateHandler::STATE_PHONE_NOT_NEARBY; | 62 return EasyUnlockScreenlockStateHandler::STATE_PHONE_NOT_NEARBY; |
| 63 case easy_unlock_private::STATE_PHONE_UNSUPPORTED: |
| 64 return EasyUnlockScreenlockStateHandler::STATE_PHONE_UNSUPPORTED; |
| 63 case easy_unlock_private::STATE_AUTHENTICATED: | 65 case easy_unlock_private::STATE_AUTHENTICATED: |
| 64 return EasyUnlockScreenlockStateHandler::STATE_AUTHENTICATED; | 66 return EasyUnlockScreenlockStateHandler::STATE_AUTHENTICATED; |
| 65 default: | 67 default: |
| 66 return EasyUnlockScreenlockStateHandler::STATE_INACTIVE; | 68 return EasyUnlockScreenlockStateHandler::STATE_INACTIVE; |
| 67 } | 69 } |
| 68 } | 70 } |
| 69 | 71 |
| 70 } // namespace | 72 } // namespace |
| 71 | 73 |
| 72 // static | 74 // static |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 bool EasyUnlockPrivateGetRemoteDevicesFunction::RunSync() { | 519 bool EasyUnlockPrivateGetRemoteDevicesFunction::RunSync() { |
| 518 Profile* profile = Profile::FromBrowserContext(browser_context()); | 520 Profile* profile = Profile::FromBrowserContext(browser_context()); |
| 519 const base::ListValue* devices = | 521 const base::ListValue* devices = |
| 520 EasyUnlockService::Get(profile)->GetRemoteDevices(); | 522 EasyUnlockService::Get(profile)->GetRemoteDevices(); |
| 521 SetResult(devices ? devices->DeepCopy() : new base::ListValue()); | 523 SetResult(devices ? devices->DeepCopy() : new base::ListValue()); |
| 522 return true; | 524 return true; |
| 523 } | 525 } |
| 524 | 526 |
| 525 } // namespace api | 527 } // namespace api |
| 526 } // namespace extensions | 528 } // namespace extensions |
| OLD | NEW |