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

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

Issue 657333002: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 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/data_reduction_proxy_infobar.h" 5 #include "chrome/browser/ui/android/infobars/data_reduction_proxy_infobar.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/android/resource_mapper.h" 10 #include "chrome/browser/android/resource_mapper.h"
(...skipping 13 matching lines...) Expand all
24 web_contents, base::android::ConvertJavaStringToUTF8(env, jlink_url)); 24 web_contents, base::android::ConvertJavaStringToUTF8(env, jlink_url));
25 } 25 }
26 26
27 // static 27 // static
28 bool DataReductionProxyInfoBar::Register(JNIEnv* env) { 28 bool DataReductionProxyInfoBar::Register(JNIEnv* env) {
29 return RegisterNativesImpl(env); 29 return RegisterNativesImpl(env);
30 } 30 }
31 31
32 DataReductionProxyInfoBar::DataReductionProxyInfoBar( 32 DataReductionProxyInfoBar::DataReductionProxyInfoBar(
33 scoped_ptr<DataReductionProxyInfoBarDelegate> delegate) 33 scoped_ptr<DataReductionProxyInfoBarDelegate> delegate)
34 : ConfirmInfoBar(delegate.PassAs<ConfirmInfoBarDelegate>()), 34 : ConfirmInfoBar(delegate.Pass()), java_data_reduction_proxy_delegate_() {
35 java_data_reduction_proxy_delegate_() {
36 } 35 }
37 36
38 DataReductionProxyInfoBar::~DataReductionProxyInfoBar() { 37 DataReductionProxyInfoBar::~DataReductionProxyInfoBar() {
39 } 38 }
40 39
41 base::android::ScopedJavaLocalRef<jobject> 40 base::android::ScopedJavaLocalRef<jobject>
42 DataReductionProxyInfoBar::CreateRenderInfoBar(JNIEnv* env) { 41 DataReductionProxyInfoBar::CreateRenderInfoBar(JNIEnv* env) {
43 java_data_reduction_proxy_delegate_.Reset( 42 java_data_reduction_proxy_delegate_.Reset(
44 Java_DataReductionProxyInfoBarDelegate_create(env)); 43 Java_DataReductionProxyInfoBarDelegate_create(env));
45 44
(...skipping 17 matching lines...) Expand all
63 return scoped_ptr<infobars::InfoBar>( 62 return scoped_ptr<infobars::InfoBar>(
64 new DataReductionProxyInfoBar(delegate.Pass())); 63 new DataReductionProxyInfoBar(delegate.Pass()));
65 } 64 }
66 65
67 66
68 // JNI for DataReductionProxyInfoBarDelegate. 67 // JNI for DataReductionProxyInfoBarDelegate.
69 void 68 void
70 Launch(JNIEnv* env, jclass clazz, jobject jweb_contents, jstring jlink_url) { 69 Launch(JNIEnv* env, jclass clazz, jobject jweb_contents, jstring jlink_url) {
71 DataReductionProxyInfoBar::Launch(env, clazz, jweb_contents, jlink_url); 70 DataReductionProxyInfoBar::Launch(env, clazz, jweb_contents, jlink_url);
72 } 71 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/android/infobars/confirm_infobar.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