Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chrome / browser / password_manager / password_manager_util.h
blob6556269b87c48d39bc4ad400ca82e8d37aa13358
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_UTIL_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_UTIL_H_
8 #include "base/basictypes.h"
9 #include "base/callback.h"
10 #include "ui/gfx/native_widget_types.h"
12 namespace password_manager_util {
14 enum OsPasswordStatus {
15 PASSWORD_STATUS_UNKNOWN = 0,
16 PASSWORD_STATUS_UNSUPPORTED,
17 PASSWORD_STATUS_BLANK,
18 PASSWORD_STATUS_NONBLANK,
19 PASSWORD_STATUS_WIN_DOMAIN,
20 // NOTE: Add new status types only immediately above this line. Also,
21 // make sure the enum list in tools/histogram/histograms.xml is
22 // updated with any change in here.
23 MAX_PASSWORD_STATUS
26 // Attempts to (re-)authenticate the user of the OS account. Returns true if
27 // the user was successfully authenticated, or if authentication was not
28 // possible. On platforms where reauthentication is not possible or does not
29 // make sense, the default implementation always returns true.
30 bool AuthenticateUser(gfx::NativeWindow window);
32 // Query the system to determine whether the current logged on user has a
33 // password set on their OS account. It should be called on UI thread. |reply|
34 // is invoked on UI thread with result.
35 void GetOsPasswordStatus(const base::Callback<void(OsPasswordStatus)>& reply);
37 } // namespace password_manager_util
39 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_UTIL_H_