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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/update_password_infobar.h" 5 #include "chrome/browser/ui/android/infobars/update_password_infobar.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
11 #include "base/android/jni_string.h" 11 #include "base/android/jni_string.h"
12 #include "chrome/browser/password_manager/update_password_infobar_delegate.h" 12 #include "chrome/browser/password_manager/update_password_infobar_delegate.h"
13 #include "components/password_manager/core/common/credential_manager_types.h" 13 #include "components/password_manager/core/common/credential_manager_types.h"
14 #include "jni/UpdatePasswordInfoBar_jni.h" 14 #include "jni/UpdatePasswordInfoBar_jni.h"
15 15
16 UpdatePasswordInfoBar::UpdatePasswordInfoBar( 16 UpdatePasswordInfoBar::UpdatePasswordInfoBar(
17 scoped_ptr<UpdatePasswordInfoBarDelegate> delegate) 17 std::unique_ptr<UpdatePasswordInfoBarDelegate> delegate)
18 : ConfirmInfoBar(std::move(delegate)) {} 18 : ConfirmInfoBar(std::move(delegate)) {}
19 19
20 UpdatePasswordInfoBar::~UpdatePasswordInfoBar() {} 20 UpdatePasswordInfoBar::~UpdatePasswordInfoBar() {}
21 21
22 bool UpdatePasswordInfoBar::Register(JNIEnv* env) { 22 bool UpdatePasswordInfoBar::Register(JNIEnv* env) {
23 return RegisterNativesImpl(env); 23 return RegisterNativesImpl(env);
24 } 24 }
25 25
26 int UpdatePasswordInfoBar::GetIdOfSelectedUsername() const { 26 int UpdatePasswordInfoBar::GetIdOfSelectedUsername() const {
27 return Java_UpdatePasswordInfoBar_getSelectedUsername( 27 return Java_UpdatePasswordInfoBar_getSelectedUsername(
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 update_password_delegate->is_smartlock_branding_enabled())); 59 update_password_delegate->is_smartlock_branding_enabled()));
60 60
61 java_infobar_.Reset(env, infobar.obj()); 61 java_infobar_.Reset(env, infobar.obj());
62 return infobar; 62 return infobar;
63 } 63 }
64 64
65 void UpdatePasswordInfoBar::OnLinkClicked(JNIEnv* env, 65 void UpdatePasswordInfoBar::OnLinkClicked(JNIEnv* env,
66 const JavaParamRef<jobject>& obj) { 66 const JavaParamRef<jobject>& obj) {
67 GetDelegate()->LinkClicked(NEW_FOREGROUND_TAB); 67 GetDelegate()->LinkClicked(NEW_FOREGROUND_TAB);
68 } 68 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698