[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / android / password_authentication_manager.h
blobb0c57e23a890c1e01585976efde4ded55487376a
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.
5 #ifndef CHROME_BROWSER_ANDROID_PASSWORD_AUTHENTICATION_MANAGER_H_
6 #define CHROME_BROWSER_ANDROID_PASSWORD_AUTHENTICATION_MANAGER_H_
8 #include "base/android/jni_android.h"
9 #include "base/callback.h"
10 #include "components/autofill/core/common/password_form_fill_data.h"
12 namespace content {
13 class WebContents;
16 // Manager for authenticating the use of stored passwords.
17 class PasswordAuthenticationManager {
18 public:
19 // JNI registration
20 static bool RegisterPasswordAuthenticationManager(JNIEnv* env);
22 // Request an authentication challenge for the specified webcontents to allow
23 // password autofill. If the authentication is successful, run the
24 // |success_callback|.
25 static void AuthenticatePasswordAutofill(
26 content::WebContents* web_contents,
27 const base::Closure& success_callback);
29 private:
30 PasswordAuthenticationManager();
31 ~PasswordAuthenticationManager();
33 DISALLOW_COPY_AND_ASSIGN(PasswordAuthenticationManager);
36 #endif // CHROME_BROWSER_ANDROID_PASSWORD_AUTHENTICATION_MANAGER_H_