Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / crypto_module_password_dialog.h
blob86dc0872d2fc814b1f845438912e72bcc664e3bb
1 // Copyright (c) 2012 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_UI_CRYPTO_MODULE_PASSWORD_DIALOG_H_
6 #define CHROME_BROWSER_UI_CRYPTO_MODULE_PASSWORD_DIALOG_H_
8 #include <string>
10 #include "base/callback.h"
11 #include "ui/gfx/native_widget_types.h"
13 namespace chrome {
15 // An enum to describe the reason for the password request.
16 enum CryptoModulePasswordReason {
17 kCryptoModulePasswordKeygen,
18 kCryptoModulePasswordCertEnrollment,
19 kCryptoModulePasswordClientAuth,
20 kCryptoModulePasswordListCerts,
21 kCryptoModulePasswordCertImport,
22 kCryptoModulePasswordCertExport,
25 typedef base::Callback<void(const std::string&)> CryptoModulePasswordCallback;
27 // Display a dialog, prompting the user to authenticate to unlock
28 // |module|. |reason| describes the purpose of the authentication and
29 // affects the message displayed in the dialog. |hostname| is the hostname
30 // of the server which requested the access.
31 void ShowCryptoModulePasswordDialog(
32 const std::string& module_name,
33 bool retry,
34 CryptoModulePasswordReason reason,
35 const std::string& hostname,
36 gfx::NativeWindow parent,
37 const CryptoModulePasswordCallback& callback);
39 } // namespace chrome
41 #endif // CHROME_BROWSER_UI_CRYPTO_MODULE_PASSWORD_DIALOG_H_