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

Unified Diff: chrome/browser/ui/android/infobars/save_password_infobar.cc

Issue 2397743002: Ditch first run experience from Save Password Infobar (Closed)
Patch Set: get rid of unused web_contents_ Created 4 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
« no previous file with comments | « chrome/browser/ui/android/infobars/save_password_infobar.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/android/infobars/save_password_infobar.cc
diff --git a/chrome/browser/ui/android/infobars/save_password_infobar.cc b/chrome/browser/ui/android/infobars/save_password_infobar.cc
deleted file mode 100644
index 0f285bb82aa2adf95916982b17357d5fc24326cb..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/android/infobars/save_password_infobar.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2015 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/ui/android/infobars/save_password_infobar.h"
-
-#include <utility>
-
-#include "base/android/jni_android.h"
-#include "base/android/jni_string.h"
-#include "base/memory/ptr_util.h"
-#include "jni/SavePasswordInfoBar_jni.h"
-
-using base::android::JavaParamRef;
-
-SavePasswordInfoBar::SavePasswordInfoBar(
- std::unique_ptr<SavePasswordInfoBarDelegate> delegate)
- : ConfirmInfoBar(std::move(delegate)) {}
-
-SavePasswordInfoBar::~SavePasswordInfoBar() {
-}
-
-base::android::ScopedJavaLocalRef<jobject>
-SavePasswordInfoBar::CreateRenderInfoBar(JNIEnv* env) {
- using base::android::ConvertUTF16ToJavaString;
- using base::android::ScopedJavaLocalRef;
- SavePasswordInfoBarDelegate* save_password_delegate =
- static_cast<SavePasswordInfoBarDelegate*>(delegate());
- ScopedJavaLocalRef<jstring> ok_button_text = ConvertUTF16ToJavaString(
- env, GetTextFor(ConfirmInfoBarDelegate::BUTTON_OK));
- ScopedJavaLocalRef<jstring> cancel_button_text = ConvertUTF16ToJavaString(
- env, GetTextFor(ConfirmInfoBarDelegate::BUTTON_CANCEL));
- ScopedJavaLocalRef<jstring> message_text = ConvertUTF16ToJavaString(
- env, save_password_delegate->GetMessageText());
- ScopedJavaLocalRef<jstring> first_run_experience_message =
- ConvertUTF16ToJavaString(
- env, save_password_delegate->GetFirstRunExperienceMessage());
-
- return Java_SavePasswordInfoBar_show(
- env, GetEnumeratedIconId(), message_text,
- save_password_delegate->message_link_range().start(),
- save_password_delegate->message_link_range().end(), ok_button_text,
- cancel_button_text, first_run_experience_message);
-}
-
-void SavePasswordInfoBar::OnLinkClicked(JNIEnv* env,
- const JavaParamRef<jobject>& obj) {
- GetDelegate()->LinkClicked(WindowOpenDisposition::NEW_FOREGROUND_TAB);
-}
-
-std::unique_ptr<infobars::InfoBar> CreateSavePasswordInfoBar(
- std::unique_ptr<SavePasswordInfoBarDelegate> delegate) {
- return base::MakeUnique<SavePasswordInfoBar>(std::move(delegate));
-}
« no previous file with comments | « chrome/browser/ui/android/infobars/save_password_infobar.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698