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

Unified Diff: net/url_request/url_request_context.h

Issue 2546213003: Implement net/ support for Android's NetworkSecurityPolicy (Closed)
Patch Set: Address comments and add test 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 side-by-side diff with in-line comments
Download patch
Index: net/url_request/url_request_context.h
diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h
index 0158d9aca17282fb5153f318f65d596a3c5fb6ef..cfe494989876e6f27fca256185acd8dbd39222c6 100644
--- a/net/url_request/url_request_context.h
+++ b/net/url_request/url_request_context.h
@@ -230,6 +230,15 @@ class NET_EXPORT URLRequestContext
bool enable_brotli() const { return enable_brotli_; }
+ // Sets the |check_cleartext_permitted| flag, which controls whether to check
+ // system policy before allowing a cleartext http or ws request.
+ void set_check_cleartext_permitted(bool check_cleartext_permitted) {
+ check_cleartext_permitted_ = check_cleartext_permitted;
+ }
+
+ // Returns current value of the |check_cleartext_permitted| flag.
+ bool check_cleartext_permitted() const { return check_cleartext_permitted_; }
+
private:
// ---------------------------------------------------------------------------
// Important: When adding any new members below, consider whether they need to
@@ -268,6 +277,9 @@ class NET_EXPORT URLRequestContext
// Enables Brotli Content-Encoding support.
bool enable_brotli_;
+ // Enables checking system policy before allowing a cleartext http or ws
+ // request. Only used on Android.
+ bool check_cleartext_permitted_;
DISALLOW_COPY_AND_ASSIGN(URLRequestContext);
};

Powered by Google App Engine
This is Rietveld 408576698