OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/screenlock_private/screenlock_private_ap
i.h" | 5 #include "chrome/browser/extensions/api/screenlock_private/screenlock_private_ap
i.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 case ScreenlockBridge::LockHandler::USER_CLICK: | 50 case ScreenlockBridge::LockHandler::USER_CLICK: |
51 return screenlock::AUTH_TYPE_USERCLICK; | 51 return screenlock::AUTH_TYPE_USERCLICK; |
52 case ScreenlockBridge::LockHandler::ONLINE_SIGN_IN: | 52 case ScreenlockBridge::LockHandler::ONLINE_SIGN_IN: |
53 // Apps should treat forced online sign in same as system password. | 53 // Apps should treat forced online sign in same as system password. |
54 return screenlock::AUTH_TYPE_OFFLINEPASSWORD; | 54 return screenlock::AUTH_TYPE_OFFLINEPASSWORD; |
55 case ScreenlockBridge::LockHandler::EXPAND_THEN_USER_CLICK: | 55 case ScreenlockBridge::LockHandler::EXPAND_THEN_USER_CLICK: |
56 // This type is used for public sessions, which do not support screen | 56 // This type is used for public sessions, which do not support screen |
57 // locking. | 57 // locking. |
58 NOTREACHED(); | 58 NOTREACHED(); |
59 return screenlock::AUTH_TYPE_NONE; | 59 return screenlock::AUTH_TYPE_NONE; |
| 60 case ScreenlockBridge::LockHandler::FORCE_OFFLINE_PASSWORD: |
| 61 return screenlock::AUTH_TYPE_OFFLINEPASSWORD; |
60 } | 62 } |
61 NOTREACHED(); | 63 NOTREACHED(); |
62 return screenlock::AUTH_TYPE_OFFLINEPASSWORD; | 64 return screenlock::AUTH_TYPE_OFFLINEPASSWORD; |
63 } | 65 } |
64 | 66 |
65 } // namespace | 67 } // namespace |
66 | 68 |
67 ScreenlockPrivateGetLockedFunction::ScreenlockPrivateGetLockedFunction() {} | 69 ScreenlockPrivateGetLockedFunction::ScreenlockPrivateGetLockedFunction() {} |
68 | 70 |
69 ScreenlockPrivateGetLockedFunction::~ScreenlockPrivateGetLockedFunction() {} | 71 ScreenlockPrivateGetLockedFunction::~ScreenlockPrivateGetLockedFunction() {} |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 scoped_ptr<base::ListValue> args(new base::ListValue()); | 325 scoped_ptr<base::ListValue> args(new base::ListValue()); |
324 args->AppendString(screenlock::ToString(FromLockHandlerAuthType(auth_type))); | 326 args->AppendString(screenlock::ToString(FromLockHandlerAuthType(auth_type))); |
325 args->AppendString(value); | 327 args->AppendString(value); |
326 | 328 |
327 scoped_ptr<extensions::Event> event(new extensions::Event( | 329 scoped_ptr<extensions::Event> event(new extensions::Event( |
328 screenlock::OnAuthAttempted::kEventName, args.Pass())); | 330 screenlock::OnAuthAttempted::kEventName, args.Pass())); |
329 extensions::EventRouter::Get(browser_context_)->BroadcastEvent(event.Pass()); | 331 extensions::EventRouter::Get(browser_context_)->BroadcastEvent(event.Pass()); |
330 } | 332 } |
331 | 333 |
332 } // namespace extensions | 334 } // namespace extensions |
OLD | NEW |