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

Side by Side Diff: components/proximity_auth/remote_status_update.h

Issue 629183003: [Easy Unlock] Port RemoteStatusUpdate class to native code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_PROXIMITY_AUTH_REMOTE_STATUS_UPDATE_H
6 #define COMPONENTS_PROXIMITY_AUTH_REMOTE_STATUS_UPDATE_H
7
8 #include <string>
9
10 #include "base/memory/scoped_ptr.h"
11
12 namespace proximity_auth {
13
14 // Corresponds to the possible values for the 'user_presence' status update
15 // field.
16 enum UserPresence {
17 USER_PRESENT,
18 USER_ABSENT,
19 USER_PRESENCE_UNKNOWN,
20 };
21
22 // Corresponds to the possible values for the 'secure_screen_lock' status update
23 // field.
24 enum SecureScreenLockState {
25 SECURE_SCREEN_LOCK_ENABLED,
26 SECURE_SCREEN_LOCK_DISABLED,
27 SECURE_SCREEN_LOCK_STATE_UNKNOWN,
28 };
29
30 // Corresponds to the possible values for the 'trust_agent' status update field.
31 enum TrustAgentState {
32 TRUST_AGENT_ENABLED,
33 TRUST_AGENT_DISABLED,
34 TRUST_AGENT_UNSUPPORTED,
35 };
36
37 // Represents a 'status_update' message received from the remote device.
38 struct RemoteStatusUpdate {
39 // Parses a JSON object into a RemoteStatusUpdate. Returns a null pointer if
40 // the JSON is not valid.
41 static scoped_ptr<RemoteStatusUpdate> FromJson(const std::string& json);
42
43 UserPresence user_presence;
44 SecureScreenLockState secure_screen_lock_state;
45 TrustAgentState trust_agent_state;
46 };
47
48 } // namespace proximity_auth
49
50 #endif // COMPONENTS_PROXIMITY_AUTH_REMOTE_STATUS_UPDATE_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698