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

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

Issue 1551033002: Convert Pass()→std::move() in //chrome (Android edition) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enable RVO by making types match Created 4 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/save_password_infobar.h" 5 #include "chrome/browser/ui/android/infobars/save_password_infobar.h"
6 6
7 #include <utility>
8
7 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
9 #include "jni/SavePasswordInfoBar_jni.h" 11 #include "jni/SavePasswordInfoBar_jni.h"
10 12
11 SavePasswordInfoBar::SavePasswordInfoBar( 13 SavePasswordInfoBar::SavePasswordInfoBar(
12 scoped_ptr<SavePasswordInfoBarDelegate> delegate) 14 scoped_ptr<SavePasswordInfoBarDelegate> delegate)
13 : ConfirmInfoBar(delegate.Pass()) { 15 : ConfirmInfoBar(std::move(delegate)) {}
14 }
15 16
16 SavePasswordInfoBar::~SavePasswordInfoBar() { 17 SavePasswordInfoBar::~SavePasswordInfoBar() {
17 } 18 }
18 19
19 base::android::ScopedJavaLocalRef<jobject> 20 base::android::ScopedJavaLocalRef<jobject>
20 SavePasswordInfoBar::CreateRenderInfoBar(JNIEnv* env) { 21 SavePasswordInfoBar::CreateRenderInfoBar(JNIEnv* env) {
21 using base::android::ConvertUTF16ToJavaString; 22 using base::android::ConvertUTF16ToJavaString;
22 using base::android::ScopedJavaLocalRef; 23 using base::android::ScopedJavaLocalRef;
23 SavePasswordInfoBarDelegate* save_password_delegate = 24 SavePasswordInfoBarDelegate* save_password_delegate =
24 static_cast<SavePasswordInfoBarDelegate*>(delegate()); 25 static_cast<SavePasswordInfoBarDelegate*>(delegate());
(...skipping 18 matching lines...) Expand all
43 const JavaParamRef<jobject>& obj) { 44 const JavaParamRef<jobject>& obj) {
44 GetDelegate()->LinkClicked(NEW_FOREGROUND_TAB); 45 GetDelegate()->LinkClicked(NEW_FOREGROUND_TAB);
45 } 46 }
46 47
47 bool SavePasswordInfoBar::Register(JNIEnv* env) { 48 bool SavePasswordInfoBar::Register(JNIEnv* env) {
48 return RegisterNativesImpl(env); 49 return RegisterNativesImpl(env);
49 } 50 }
50 51
51 scoped_ptr<infobars::InfoBar> CreateSavePasswordInfoBar( 52 scoped_ptr<infobars::InfoBar> CreateSavePasswordInfoBar(
52 scoped_ptr<SavePasswordInfoBarDelegate> delegate) { 53 scoped_ptr<SavePasswordInfoBarDelegate> delegate) {
53 return make_scoped_ptr(new SavePasswordInfoBar(delegate.Pass())); 54 return make_scoped_ptr(new SavePasswordInfoBar(std::move(delegate)));
54 } 55 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/android/infobars/infobar_android.cc ('k') | chrome/browser/ui/android/infobars/translate_infobar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698