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

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

Issue 2237943002: Remove now-unnecessary .obj() in Java method calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@switch-context
Patch Set: Rebase *again* :( Created 4 years, 4 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> 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"
(...skipping 19 matching lines...) Expand all
30 env, GetTextFor(ConfirmInfoBarDelegate::BUTTON_OK)); 30 env, GetTextFor(ConfirmInfoBarDelegate::BUTTON_OK));
31 ScopedJavaLocalRef<jstring> cancel_button_text = ConvertUTF16ToJavaString( 31 ScopedJavaLocalRef<jstring> cancel_button_text = ConvertUTF16ToJavaString(
32 env, GetTextFor(ConfirmInfoBarDelegate::BUTTON_CANCEL)); 32 env, GetTextFor(ConfirmInfoBarDelegate::BUTTON_CANCEL));
33 ScopedJavaLocalRef<jstring> message_text = ConvertUTF16ToJavaString( 33 ScopedJavaLocalRef<jstring> message_text = ConvertUTF16ToJavaString(
34 env, save_password_delegate->GetMessageText()); 34 env, save_password_delegate->GetMessageText());
35 ScopedJavaLocalRef<jstring> first_run_experience_message = 35 ScopedJavaLocalRef<jstring> first_run_experience_message =
36 ConvertUTF16ToJavaString( 36 ConvertUTF16ToJavaString(
37 env, save_password_delegate->GetFirstRunExperienceMessage()); 37 env, save_password_delegate->GetFirstRunExperienceMessage());
38 38
39 return Java_SavePasswordInfoBar_show( 39 return Java_SavePasswordInfoBar_show(
40 env, GetEnumeratedIconId(), message_text.obj(), 40 env, GetEnumeratedIconId(), message_text,
41 save_password_delegate->message_link_range().start(), 41 save_password_delegate->message_link_range().start(),
42 save_password_delegate->message_link_range().end(), ok_button_text.obj(), 42 save_password_delegate->message_link_range().end(), ok_button_text,
43 cancel_button_text.obj(), first_run_experience_message.obj()); 43 cancel_button_text, first_run_experience_message);
44 } 44 }
45 45
46 void SavePasswordInfoBar::OnLinkClicked(JNIEnv* env, 46 void SavePasswordInfoBar::OnLinkClicked(JNIEnv* env,
47 const JavaParamRef<jobject>& obj) { 47 const JavaParamRef<jobject>& obj) {
48 GetDelegate()->LinkClicked(NEW_FOREGROUND_TAB); 48 GetDelegate()->LinkClicked(NEW_FOREGROUND_TAB);
49 } 49 }
50 50
51 std::unique_ptr<infobars::InfoBar> CreateSavePasswordInfoBar( 51 std::unique_ptr<infobars::InfoBar> CreateSavePasswordInfoBar(
52 std::unique_ptr<SavePasswordInfoBarDelegate> delegate) { 52 std::unique_ptr<SavePasswordInfoBarDelegate> delegate) {
53 return base::WrapUnique(new SavePasswordInfoBar(std::move(delegate))); 53 return base::WrapUnique(new SavePasswordInfoBar(std::move(delegate)));
54 } 54 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698