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

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

Issue 10905207: Implement net::GetNetworkList() for Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 (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 #ifndef NET_ANDROID_NETWORK_LIBRARY_H_ 5 #ifndef NET_ANDROID_NETWORK_LIBRARY_H_
6 #define NET_ANDROID_NETWORK_LIBRARY_H_ 6 #define NET_ANDROID_NETWORK_LIBRARY_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 26 matching lines...) Expand all
37 bool StoreKeyPair(const uint8* public_key, 37 bool StoreKeyPair(const uint8* public_key,
38 size_t public_len, 38 size_t public_len,
39 const uint8* private_key, 39 const uint8* private_key,
40 size_t private_len); 40 size_t private_len);
41 41
42 // Returns true if it can determine that only loopback addresses are configured. 42 // Returns true if it can determine that only loopback addresses are configured.
43 // i.e. if only 127.0.0.1 and ::1 are routable. 43 // i.e. if only 127.0.0.1 and ::1 are routable.
44 // Also returns false if it cannot determine this. 44 // Also returns false if it cannot determine this.
45 bool HaveOnlyLoopbackAddresses(); 45 bool HaveOnlyLoopbackAddresses();
46 46
47 // Return a string contains network list items, each item is a network name and
bulach 2012/09/11 10:16:36 nit: Returns a string containing
48 // address pair. i.e. "eth0,10.0.0.2;eth0,fe80::5054:ff:fe12:3456" is a result
49 // string contains two items.
bulach 2012/09/11 10:16:36 nit: containing
50 std::string GetNetworkList();
51
47 // Get the mime type (if any) that is associated with the file extension. 52 // Get the mime type (if any) that is associated with the file extension.
48 // Returns true if a corresponding mime type exists. 53 // Returns true if a corresponding mime type exists.
49 bool GetMimeTypeFromExtension(const std::string& extension, 54 bool GetMimeTypeFromExtension(const std::string& extension,
50 std::string* result); 55 std::string* result);
51 56
52 // Register JNI methods 57 // Register JNI methods
53 bool RegisterNetworkLibrary(JNIEnv* env); 58 bool RegisterNetworkLibrary(JNIEnv* env);
54 59
55 } // namespace android 60 } // namespace android
56 } // namespace net 61 } // namespace net
57 62
58 #endif // NET_ANDROID_NETWORK_LIBRARY_H_ 63 #endif // NET_ANDROID_NETWORK_LIBRARY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698