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

Side by Side Diff: chrome/browser/ui/android/infobars/generated_password_saved_infobar.cc

Issue 2588263003: Reland: Remove Finch support for PasswordBranding (Closed)
Patch Set: Rebased only Created 4 years 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
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 #include "chrome/browser/ui/android/infobars/generated_password_saved_infobar.h" 5 #include "chrome/browser/ui/android/infobars/generated_password_saved_infobar.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "chrome/browser/infobars/infobar_service.h" 12 #include "chrome/browser/infobars/infobar_service.h"
13 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
14 #include "jni/GeneratedPasswordSavedInfoBarDelegate_jni.h" 14 #include "jni/GeneratedPasswordSavedInfoBarDelegate_jni.h"
15 15
16 using base::android::JavaParamRef; 16 using base::android::JavaParamRef;
17 17
18 // static 18 // static
19 void GeneratedPasswordSavedInfoBarDelegateAndroid::Create( 19 void GeneratedPasswordSavedInfoBarDelegateAndroid::Create(
20 content::WebContents* web_contents) { 20 content::WebContents* web_contents) {
21 InfoBarService::FromWebContents(web_contents) 21 InfoBarService::FromWebContents(web_contents)
22 ->AddInfoBar( 22 ->AddInfoBar(
23 base::MakeUnique<GeneratedPasswordSavedInfoBar>(base::WrapUnique( 23 base::MakeUnique<GeneratedPasswordSavedInfoBar>(base::WrapUnique(
24 new GeneratedPasswordSavedInfoBarDelegateAndroid(web_contents)))); 24 new GeneratedPasswordSavedInfoBarDelegateAndroid())));
25 } 25 }
26 26
27 GeneratedPasswordSavedInfoBar::GeneratedPasswordSavedInfoBar( 27 GeneratedPasswordSavedInfoBar::GeneratedPasswordSavedInfoBar(
28 std::unique_ptr<GeneratedPasswordSavedInfoBarDelegateAndroid> delegate) 28 std::unique_ptr<GeneratedPasswordSavedInfoBarDelegateAndroid> delegate)
29 : InfoBarAndroid(std::move(delegate)) {} 29 : InfoBarAndroid(std::move(delegate)) {}
30 30
31 GeneratedPasswordSavedInfoBar::~GeneratedPasswordSavedInfoBar() { 31 GeneratedPasswordSavedInfoBar::~GeneratedPasswordSavedInfoBar() {
32 } 32 }
33 33
34 base::android::ScopedJavaLocalRef<jobject> 34 base::android::ScopedJavaLocalRef<jobject>
(...skipping 20 matching lines...) Expand all
55 ->OnInlineLinkClicked(); 55 ->OnInlineLinkClicked();
56 RemoveSelf(); 56 RemoveSelf();
57 } 57 }
58 58
59 void GeneratedPasswordSavedInfoBar::ProcessButton(int action) { 59 void GeneratedPasswordSavedInfoBar::ProcessButton(int action) {
60 if (!owner()) 60 if (!owner())
61 return; 61 return;
62 62
63 RemoveSelf(); 63 RemoveSelf();
64 } 64 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698