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

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

Issue 257673002: Make it possible to build url/ without ICU on android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missed a spot Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « build/common.gypi ('k') | net/test/run_all_unittests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/android/base_jni_registrar.h" 5 #include "base/android/base_jni_registrar.h"
6 #include "base/android/jni_android.h" 6 #include "base/android/jni_android.h"
7 #include "base/android/jni_registrar.h" 7 #include "base/android/jni_registrar.h"
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/i18n/icu_util.h" 9 #include "base/i18n/icu_util.h"
10 #include "components/cronet/android/org_chromium_net_UrlRequest.h" 10 #include "components/cronet/android/org_chromium_net_UrlRequest.h"
11 #include "components/cronet/android/org_chromium_net_UrlRequestContext.h" 11 #include "components/cronet/android/org_chromium_net_UrlRequestContext.h"
12 #include "net/android/net_jni_registrar.h" 12 #include "net/android/net_jni_registrar.h"
13 #include "url/android/url_jni_registrar.h"
13 14
14 namespace { 15 namespace {
15 16
16 const base::android::RegistrationMethod kCronetRegisteredMethods[] = { 17 const base::android::RegistrationMethod kCronetRegisteredMethods[] = {
17 {"BaseAndroid", base::android::RegisterJni}, 18 {"BaseAndroid", base::android::RegisterJni},
18 {"NetAndroid", net::android::RegisterJni}, 19 {"NetAndroid", net::android::RegisterJni},
19 {"UrlRequest", cronet::UrlRequestRegisterJni}, 20 {"UrlAndroid", url::android::RegisterJni},
20 {"UrlRequestContext", cronet::UrlRequestContextRegisterJni}, 21 {"UrlRequest", cronet::UrlRequestRegisterJni},
22 {"UrlRequestContext", cronet::UrlRequestContextRegisterJni},
21 }; 23 };
22 24
23 base::AtExitManager* g_at_exit_manager = NULL; 25 base::AtExitManager* g_at_exit_manager = NULL;
24 26
25
26 } // namespace 27 } // namespace
27 28
28 // Checks the available version of JNI. Also, caches Java reflection artifacts. 29 // Checks the available version of JNI. Also, caches Java reflection artifacts.
29 extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved) { 30 extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved) {
30 JNIEnv* env; 31 JNIEnv* env;
31 if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) { 32 if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
32 return -1; 33 return -1;
33 } 34 }
34 35
35 base::android::InitVM(vm); 36 base::android::InitVM(vm);
(...skipping 10 matching lines...) Expand all
46 return JNI_VERSION_1_6; 47 return JNI_VERSION_1_6;
47 } 48 }
48 49
49 extern "C" void JNIEXPORT JNICALL JNI_OnUnLoad(JavaVM* jvm, void* reserved) { 50 extern "C" void JNIEXPORT JNICALL JNI_OnUnLoad(JavaVM* jvm, void* reserved) {
50 if (g_at_exit_manager) { 51 if (g_at_exit_manager) {
51 delete g_at_exit_manager; 52 delete g_at_exit_manager;
52 g_at_exit_manager = NULL; 53 g_at_exit_manager = NULL;
53 } 54 }
54 } 55 }
55 56
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | net/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698