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

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

Issue 2546213003: Implement net/ support for Android's NetworkSecurityPolicy (Closed)
Patch Set: Created 4 years 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 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 27 matching lines...) Expand all
38 38
39 // Helper for the <keygen> handler. Passes the DER-encoded key pair via JNI to 39 // Helper for the <keygen> handler. Passes the DER-encoded key pair via JNI to
40 // the Credentials store. The public key should be a DER-encoded 40 // the Credentials store. The public key should be a DER-encoded
41 // SubjectPublicKeyInfo (X.509) and the private key a DER-encode PrivateKeyInfo 41 // SubjectPublicKeyInfo (X.509) and the private key a DER-encode PrivateKeyInfo
42 // (PKCS#8). 42 // (PKCS#8).
43 bool StoreKeyPair(const uint8_t* public_key, 43 bool StoreKeyPair(const uint8_t* public_key,
44 size_t public_len, 44 size_t public_len,
45 const uint8_t* private_key, 45 const uint8_t* private_key,
46 size_t private_len); 46 size_t private_len);
47 47
48 bool IsCleartextPermitted(const std::string& host);
pauljensen 2016/12/07 13:20:28 add comment
mgersh 2016/12/13 17:02:58 Done.
49
48 // Returns true if it can determine that only loopback addresses are configured. 50 // Returns true if it can determine that only loopback addresses are configured.
49 // i.e. if only 127.0.0.1 and ::1 are routable. 51 // i.e. if only 127.0.0.1 and ::1 are routable.
50 // Also returns false if it cannot determine this. 52 // Also returns false if it cannot determine this.
51 bool HaveOnlyLoopbackAddresses(); 53 bool HaveOnlyLoopbackAddresses();
52 54
53 // Get the mime type (if any) that is associated with the file extension. 55 // Get the mime type (if any) that is associated with the file extension.
54 // Returns true if a corresponding mime type exists. 56 // Returns true if a corresponding mime type exists.
55 bool GetMimeTypeFromExtension(const std::string& extension, 57 bool GetMimeTypeFromExtension(const std::string& extension,
56 std::string* result); 58 std::string* result);
57 59
(...skipping 22 matching lines...) Expand all
80 NET_EXPORT bool GetIsCaptivePortal(); 82 NET_EXPORT bool GetIsCaptivePortal();
81 83
82 // Gets the SSID of the currently associated WiFi access point if there is one. 84 // Gets the SSID of the currently associated WiFi access point if there is one.
83 // Otherwise, returns empty string. 85 // Otherwise, returns empty string.
84 NET_EXPORT_PRIVATE std::string GetWifiSSID(); 86 NET_EXPORT_PRIVATE std::string GetWifiSSID();
85 87
86 } // namespace android 88 } // namespace android
87 } // namespace net 89 } // namespace net
88 90
89 #endif // NET_ANDROID_NETWORK_LIBRARY_H_ 91 #endif // NET_ANDROID_NETWORK_LIBRARY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698