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

Side by Side Diff: chrome/browser/android/password_authentication_manager.h

Issue 170783005: Always call into the embedder for password autofill auth if password uses it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove assert in requestAuthentication. Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_ANDROID_PASSWORD_AUTHENTICATION_MANAGER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_PASSWORD_AUTHENTICATION_MANAGER_H_
6 #define CHROME_BROWSER_ANDROID_PASSWORD_AUTHENTICATION_MANAGER_H_ 6 #define CHROME_BROWSER_ANDROID_PASSWORD_AUTHENTICATION_MANAGER_H_
7 7
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "components/autofill/core/common/password_form_fill_data.h" 10 #include "components/autofill/core/common/password_form_fill_data.h"
11 11
12 namespace content { 12 namespace content {
13 class WebContents; 13 class WebContents;
14 } 14 }
15 15
16 // Manager for authenticating the use of stored passwords. 16 // Manager for authenticating the use of stored passwords.
17 class PasswordAuthenticationManager { 17 class PasswordAuthenticationManager {
18 public: 18 public:
19 // JNI registration 19 // JNI registration
20 static bool RegisterPasswordAuthenticationManager(JNIEnv* env); 20 static bool RegisterPasswordAuthenticationManager(JNIEnv* env);
21 21
22 // Whether authenticating autofill passwords is currently enabled by the OS.
23 static bool IsAutofillPasswordAuthenticationEnabled();
24
25 // Request an authentication challenge for the specified webcontents to allow 22 // Request an authentication challenge for the specified webcontents to allow
26 // password autofill. If the authentication is successful, run the 23 // password autofill. If the authentication is successful, run the
27 // |success_callback|. 24 // |success_callback|.
28 static void AuthenticatePasswordAutofill( 25 static void AuthenticatePasswordAutofill(
29 content::WebContents* web_contents, 26 content::WebContents* web_contents,
30 const base::Closure& success_callback); 27 const base::Closure& success_callback);
31 28
32 private: 29 private:
33 PasswordAuthenticationManager(); 30 PasswordAuthenticationManager();
34 ~PasswordAuthenticationManager(); 31 ~PasswordAuthenticationManager();
35 32
36 DISALLOW_COPY_AND_ASSIGN(PasswordAuthenticationManager); 33 DISALLOW_COPY_AND_ASSIGN(PasswordAuthenticationManager);
37 }; 34 };
38 35
39 #endif // CHROME_BROWSER_ANDROID_PASSWORD_AUTHENTICATION_MANAGER_H_ 36 #endif // CHROME_BROWSER_ANDROID_PASSWORD_AUTHENTICATION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698