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

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

Issue 2898513002: [EasyUnlock] Observe proximity changes and clean up TX power strategy. (Closed)
Patch Set: fix_unittest Created 3 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 | « chrome/app/generated_resources.grd ('k') | chrome/browser/signin/easy_unlock_metrics.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 <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64url.h" 10 #include "base/base64url.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 return ScreenlockState::NO_PHONE; 93 return ScreenlockState::NO_PHONE;
94 case easy_unlock_private::STATE_PHONE_NOT_AUTHENTICATED: 94 case easy_unlock_private::STATE_PHONE_NOT_AUTHENTICATED:
95 return ScreenlockState::PHONE_NOT_AUTHENTICATED; 95 return ScreenlockState::PHONE_NOT_AUTHENTICATED;
96 case easy_unlock_private::STATE_PHONE_LOCKED: 96 case easy_unlock_private::STATE_PHONE_LOCKED:
97 return ScreenlockState::PHONE_LOCKED; 97 return ScreenlockState::PHONE_LOCKED;
98 case easy_unlock_private::STATE_PHONE_UNLOCKABLE: 98 case easy_unlock_private::STATE_PHONE_UNLOCKABLE:
99 return ScreenlockState::PHONE_NOT_LOCKABLE; 99 return ScreenlockState::PHONE_NOT_LOCKABLE;
100 case easy_unlock_private::STATE_PHONE_UNSUPPORTED: 100 case easy_unlock_private::STATE_PHONE_UNSUPPORTED:
101 return ScreenlockState::PHONE_UNSUPPORTED; 101 return ScreenlockState::PHONE_UNSUPPORTED;
102 case easy_unlock_private::STATE_RSSI_TOO_LOW: 102 case easy_unlock_private::STATE_RSSI_TOO_LOW:
103 case easy_unlock_private::STATE_TX_POWER_TOO_HIGH:
104 // Note: TX Power is deprecated, so we merge it with the RSSI state.
103 return ScreenlockState::RSSI_TOO_LOW; 105 return ScreenlockState::RSSI_TOO_LOW;
104 case easy_unlock_private::STATE_TX_POWER_TOO_HIGH:
105 return ScreenlockState::TX_POWER_TOO_HIGH;
106 case easy_unlock_private::STATE_PHONE_LOCKED_AND_TX_POWER_TOO_HIGH: 106 case easy_unlock_private::STATE_PHONE_LOCKED_AND_TX_POWER_TOO_HIGH:
107 return ScreenlockState::PHONE_LOCKED_AND_TX_POWER_TOO_HIGH; 107 return ScreenlockState::PHONE_LOCKED_AND_RSSI_TOO_LOW;
108 case easy_unlock_private::STATE_AUTHENTICATED: 108 case easy_unlock_private::STATE_AUTHENTICATED:
109 return ScreenlockState::AUTHENTICATED; 109 return ScreenlockState::AUTHENTICATED;
110 default: 110 default:
111 return ScreenlockState::INACTIVE; 111 return ScreenlockState::INACTIVE;
112 } 112 }
113 } 113 }
114 114
115 } // namespace 115 } // namespace
116 116
117 // static 117 // static
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 GetConnectionManager(browser_context()) 1174 GetConnectionManager(browser_context())
1175 ->GetDeviceAddress(extension(), params->connection_id); 1175 ->GetDeviceAddress(extension(), params->connection_id);
1176 if (device_address.empty()) 1176 if (device_address.empty())
1177 return RespondNow(Error("Invalid connectionId.")); 1177 return RespondNow(Error("Invalid connectionId."));
1178 return RespondNow(ArgumentList( 1178 return RespondNow(ArgumentList(
1179 easy_unlock_private::SetupConnectionGetDeviceAddress::Results::Create( 1179 easy_unlock_private::SetupConnectionGetDeviceAddress::Results::Create(
1180 device_address))); 1180 device_address)));
1181 } 1181 }
1182 1182
1183 } // namespace extensions 1183 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/signin/easy_unlock_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698