Index: net/url_request/url_request.h |
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h |
index c6ef160e69c4fb2ace304bc27e9af0cbe6c972a9..bc6dcca14eb73c5e17215fe1554f77b5b20e84e8 100644 |
--- a/net/url_request/url_request.h |
+++ b/net/url_request/url_request.h |
@@ -60,6 +60,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. |
// |
@@ -298,6 +309,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(); |
@@ -829,6 +845,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_; |
davidben
2015/08/27 18:53:50
Why is this on the URLRequest? It's not used by //
megjablon
2015/08/27 23:11:02
We add q=low to the Chrome-Proxy header in DataRed
davidben
2015/08/31 23:43:24
There's other ways to staple consumer-specific sta
bengr
2015/09/02 19:01:36
I like this goal.
megjablon
2015/09/11 20:58:03
Aren't there layering issues with creating and set
davidben
2015/09/14 20:30:29
Portions of //components can depend on //content,
|
+ |
DISALLOW_COPY_AND_ASSIGN(URLRequest); |
}; |