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

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

Issue 2579823003: Remove Finch support for PasswordBranding (Closed)
Patch Set: Drop ShouldShowSavePromptFirstRunExperience 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(base::MakeUnique<GeneratedPasswordSavedInfoBar>(
23 base::MakeUnique<GeneratedPasswordSavedInfoBar>(base::WrapUnique( 23 base::MakeUnique<GeneratedPasswordSavedInfoBarDelegateAndroid>()));
vasilii 2016/12/16 16:56:53 compilation error here due to base::MakeUnique
vabr (Chromium) 2016/12/16 18:56:28 Thanks! Will revert back to WrapUnique.
24 new GeneratedPasswordSavedInfoBarDelegateAndroid(web_contents))));
25 } 24 }
26 25
27 GeneratedPasswordSavedInfoBar::GeneratedPasswordSavedInfoBar( 26 GeneratedPasswordSavedInfoBar::GeneratedPasswordSavedInfoBar(
28 std::unique_ptr<GeneratedPasswordSavedInfoBarDelegateAndroid> delegate) 27 std::unique_ptr<GeneratedPasswordSavedInfoBarDelegateAndroid> delegate)
29 : InfoBarAndroid(std::move(delegate)) {} 28 : InfoBarAndroid(std::move(delegate)) {}
30 29
31 GeneratedPasswordSavedInfoBar::~GeneratedPasswordSavedInfoBar() { 30 GeneratedPasswordSavedInfoBar::~GeneratedPasswordSavedInfoBar() {
32 } 31 }
33 32
34 base::android::ScopedJavaLocalRef<jobject> 33 base::android::ScopedJavaLocalRef<jobject>
(...skipping 20 matching lines...) Expand all
55 ->OnInlineLinkClicked(); 54 ->OnInlineLinkClicked();
56 RemoveSelf(); 55 RemoveSelf();
57 } 56 }
58 57
59 void GeneratedPasswordSavedInfoBar::ProcessButton(int action) { 58 void GeneratedPasswordSavedInfoBar::ProcessButton(int action) {
60 if (!owner()) 59 if (!owner())
61 return; 60 return;
62 61
63 RemoveSelf(); 62 RemoveSelf();
64 } 63 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698