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

Side by Side Diff: components/cronet/android/cronet_library_loader.cc

Issue 1308363003: Revert of jni_generator: Make all object-returning natives return ScopedJavaLocalRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 "components/cronet/android/cronet_library_loader.h" 5 #include "components/cronet/android/cronet_library_loader.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include "base/android/base_jni_onload.h" 9 #include "base/android/base_jni_onload.h"
10 #include "base/android/base_jni_registrar.h" 10 #include "base/android/base_jni_registrar.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 DCHECK(!base::MessageLoop::current()); 106 DCHECK(!base::MessageLoop::current());
107 DCHECK(!g_main_message_loop); 107 DCHECK(!g_main_message_loop);
108 g_main_message_loop = new base::MessageLoopForUI(); 108 g_main_message_loop = new base::MessageLoopForUI();
109 base::MessageLoopForUI::current()->Start(); 109 base::MessageLoopForUI::current()->Start();
110 DCHECK(!g_network_change_notifier); 110 DCHECK(!g_network_change_notifier);
111 net::NetworkChangeNotifier::SetFactory( 111 net::NetworkChangeNotifier::SetFactory(
112 new net::NetworkChangeNotifierFactoryAndroid()); 112 new net::NetworkChangeNotifierFactoryAndroid());
113 g_network_change_notifier = net::NetworkChangeNotifier::Create(); 113 g_network_change_notifier = net::NetworkChangeNotifier::Create();
114 } 114 }
115 115
116 ScopedJavaLocalRef<jstring> GetCronetVersion(JNIEnv* env, jclass jcaller) { 116 jstring GetCronetVersion(JNIEnv* env, jclass jcaller) {
117 return base::android::ConvertUTF8ToJavaString(env, CRONET_VERSION); 117 return base::android::ConvertUTF8ToJavaString(env, CRONET_VERSION).Release();
118 } 118 }
119 119
120 } // namespace cronet 120 } // namespace cronet
OLDNEW
« no previous file with comments | « components/cronet/android/cronet_histogram_manager.cc ('k') | components/cronet/android/test/mock_url_request_job_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698