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

Side by Side Diff: net/android/network_library.cc

Issue 10206014: Upstream Android proxy config service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add proxy_test_cases.py Created 8 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/android/network_library.h" 5 #include "net/android/network_library.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "jni/android_network_library_jni.h" 12 #include "jni/android_network_library_jni.h"
13 #include "net/proxy/proxy_config_service_android.h"
13 14
14 using base::android::AttachCurrentThread; 15 using base::android::AttachCurrentThread;
15 using base::android::ClearException; 16 using base::android::ClearException;
16 using base::android::ConvertJavaStringToUTF8; 17 using base::android::ConvertJavaStringToUTF8;
17 using base::android::ConvertUTF8ToJavaString; 18 using base::android::ConvertUTF8ToJavaString;
18 using base::android::GetApplicationContext; 19 using base::android::GetApplicationContext;
19 using base::android::ScopedJavaLocalRef; 20 using base::android::ScopedJavaLocalRef;
20 using base::android::ToJavaArrayOfByteArray; 21 using base::android::ToJavaArrayOfByteArray;
21 using base::android::ToJavaByteArray; 22 using base::android::ToJavaByteArray;
22 23
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 77
77 if (!ret.obj()) { 78 if (!ret.obj()) {
78 LOG(WARNING) << "Call to getMimeTypeFromExtension failed"; 79 LOG(WARNING) << "Call to getMimeTypeFromExtension failed";
79 return false; 80 return false;
80 } 81 }
81 *result = ConvertJavaStringToUTF8(ret); 82 *result = ConvertJavaStringToUTF8(ret);
82 return true; 83 return true;
83 } 84 }
84 85
85 bool RegisterNetworkLibrary(JNIEnv* env) { 86 bool RegisterNetworkLibrary(JNIEnv* env) {
86 return RegisterNativesImpl(env); 87 return RegisterNativesImpl(env) &&
Yaron 2012/04/27 20:06:06 drive-by: This doesn't belong and we need to add a
88 ProxyConfigServiceAndroid::Init(env);
87 } 89 }
88 90
89 } // namespace android 91 } // namespace android
90 } // namespace net 92 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698