Index: net/url_request/url_request.h |
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h |
index f9b109e1a241d3af9c4582fde3bfc5da3ac96e16..2cc7aa7b91c76495ada21c7251426bf5c220f356 100644 |
--- a/net/url_request/url_request.h |
+++ b/net/url_request/url_request.h |
@@ -62,6 +62,17 @@ class X509Certificate; |
// excluding the "Set-Cookie:" part. |
typedef std::vector<std::string> ResponseCookies; |
+// The LoFi state which determines whether to add the LoFi header. Must stay |
+// in sync with the enum in navigation_params.h. |
+enum LoFiState { |
+ // Request a LoFi version of the resource. |
+ LOFI_ON = 0, |
+ // Request a normal (non-LoFi) version of the resource. |
+ LOFI_OFF, |
+ // Let the browser process decide whether or not to request the LoFi version. |
+ LOFI_DEFAULT, |
+}; |
+ |
//----------------------------------------------------------------------------- |
// A class representing the asynchronous load of a data stream from an URL. |
// |
@@ -300,6 +311,11 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe), |
// and it is permissible for it to be null. |
void set_delegate(Delegate* delegate); |
+ // Whether or not to request a LoFi version of the resource or let the |
+ // browser decide. |
+ LoFiState lofi_state() const { return lofi_state_; } |
+ void set_lofi_state(LoFiState lofi_state); |
+ |
// Indicates that the request body should be sent using chunked transfer |
// encoding. This method may only be called before Start() is called. |
void EnableChunkedUpload(); |
@@ -838,6 +854,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe), |
scoped_ptr<const base::debug::StackTrace> stack_trace_; |
+ // Whether or not to request a LoFi version of the resource or let the |
+ // browser decide. |
+ LoFiState lofi_state_; |
+ |
DISALLOW_COPY_AND_ASSIGN(URLRequest); |
}; |