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

Side by Side Diff: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc

Issue 485243002: Fix few minor easy unlock bugs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/signin/easy_unlock_screenlock_state_handler.h » ('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/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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/signin/easy_unlock_screenlock_state_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698