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

Side by Side Diff: chrome/browser/ui/android/infobars/auto_signin_first_run_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/auto_signin_first_run_infobar.h" 5 #include "chrome/browser/ui/android/infobars/auto_signin_first_run_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_array.h" 10 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 11 #include "base/android/jni_string.h"
10 #include "components/password_manager/core/common/credential_manager_types.h" 12 #include "components/password_manager/core/common/credential_manager_types.h"
11 #include "jni/AutoSigninFirstRunInfoBar_jni.h" 13 #include "jni/AutoSigninFirstRunInfoBar_jni.h"
12 14
13 AutoSigninFirstRunInfoBar::AutoSigninFirstRunInfoBar( 15 AutoSigninFirstRunInfoBar::AutoSigninFirstRunInfoBar(
14 scoped_ptr<AutoSigninFirstRunInfoBarDelegate> delegate) 16 scoped_ptr<AutoSigninFirstRunInfoBarDelegate> delegate)
15 : ConfirmInfoBar(delegate.Pass()) {} 17 : ConfirmInfoBar(std::move(delegate)) {}
16 18
17 AutoSigninFirstRunInfoBar::~AutoSigninFirstRunInfoBar() {} 19 AutoSigninFirstRunInfoBar::~AutoSigninFirstRunInfoBar() {}
18 20
19 base::android::ScopedJavaLocalRef<jobject> 21 base::android::ScopedJavaLocalRef<jobject>
20 AutoSigninFirstRunInfoBar::CreateRenderInfoBar(JNIEnv* env) { 22 AutoSigninFirstRunInfoBar::CreateRenderInfoBar(JNIEnv* env) {
21 using base::android::ConvertUTF16ToJavaString; 23 using base::android::ConvertUTF16ToJavaString;
22 using base::android::ScopedJavaLocalRef; 24 using base::android::ScopedJavaLocalRef;
23 AutoSigninFirstRunInfoBarDelegate* auto_signin_infobar_delegate = 25 AutoSigninFirstRunInfoBarDelegate* auto_signin_infobar_delegate =
24 static_cast<AutoSigninFirstRunInfoBarDelegate*>(delegate()); 26 static_cast<AutoSigninFirstRunInfoBarDelegate*>(delegate());
25 ScopedJavaLocalRef<jstring> ok_button_text = ConvertUTF16ToJavaString( 27 ScopedJavaLocalRef<jstring> ok_button_text = ConvertUTF16ToJavaString(
(...skipping 16 matching lines...) Expand all
42 const JavaParamRef<jobject>& obj) { 44 const JavaParamRef<jobject>& obj) {
43 GetDelegate()->LinkClicked(NEW_FOREGROUND_TAB); 45 GetDelegate()->LinkClicked(NEW_FOREGROUND_TAB);
44 } 46 }
45 47
46 bool AutoSigninFirstRunInfoBar::Register(JNIEnv* env) { 48 bool AutoSigninFirstRunInfoBar::Register(JNIEnv* env) {
47 return RegisterNativesImpl(env); 49 return RegisterNativesImpl(env);
48 } 50 }
49 51
50 scoped_ptr<infobars::InfoBar> CreateAutoSigninFirstRunInfoBar( 52 scoped_ptr<infobars::InfoBar> CreateAutoSigninFirstRunInfoBar(
51 scoped_ptr<AutoSigninFirstRunInfoBarDelegate> delegate) { 53 scoped_ptr<AutoSigninFirstRunInfoBarDelegate> delegate) {
52 return make_scoped_ptr(new AutoSigninFirstRunInfoBar(delegate.Pass())); 54 return make_scoped_ptr(new AutoSigninFirstRunInfoBar(std::move(delegate)));
53 } 55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698