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

Unified Diff: chrome/browser/android/password_authentication_manager.cc

Issue 641753002: Remove Password Authentication code that is no longer used. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/password_authentication_manager.cc
diff --git a/chrome/browser/android/password_authentication_manager.cc b/chrome/browser/android/password_authentication_manager.cc
deleted file mode 100644
index 700707571ae67944c4e491b6eceda252f28e551d..0000000000000000000000000000000000000000
--- a/chrome/browser/android/password_authentication_manager.cc
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/android/password_authentication_manager.h"
-
-#include "chrome/browser/android/tab_android.h"
-#include "jni/PasswordAuthenticationManager_jni.h"
-
-namespace {
-
-class PasswordAuthenticationCallback {
- public:
- explicit PasswordAuthenticationCallback(
- const base::Closure& success_callback) {
- success_callback_ = success_callback;
- }
-
- void OnResult(bool result) {
- if (result)
- success_callback_.Run();
- delete this;
- }
-
- private:
- virtual ~PasswordAuthenticationCallback() {}
-
- base::Closure success_callback_;
-};
-
-} // namespace
-
-PasswordAuthenticationManager::PasswordAuthenticationManager() {
-}
-
-PasswordAuthenticationManager::~PasswordAuthenticationManager() {
-}
-
-bool PasswordAuthenticationManager::RegisterPasswordAuthenticationManager(
- JNIEnv* env) {
- return RegisterNativesImpl(env);
-}
-
-void PasswordAuthenticationManager::AuthenticatePasswordAutofill(
- content::WebContents* web_contents,
- const base::Closure& success_callback) {
- TabAndroid* tab = TabAndroid::FromWebContents(web_contents);
- if (!tab)
- return;
-
- JNIEnv* env = base::android::AttachCurrentThread();
- PasswordAuthenticationCallback* auth_callback =
- new PasswordAuthenticationCallback(success_callback);
- Java_PasswordAuthenticationManager_requestAuthentication(
- env,
- tab->GetJavaObject().obj(),
- Java_PasswordAuthenticationCallback_create(
- env,
- reinterpret_cast<intptr_t>(auth_callback)).obj());
-}
-
-// static
-void OnResult(JNIEnv* env,
- jclass jcaller,
- jlong callback_ptr,
- jboolean authenticated) {
- PasswordAuthenticationCallback* callback =
- reinterpret_cast<PasswordAuthenticationCallback*>(callback_ptr);
- callback->OnResult(authenticated);
-}

Powered by Google App Engine
This is Rietveld 408576698