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..9d7c13a0a6b7d3ef34fa9ba7d1272939866baa80 100644 |
--- a/net/url_request/url_request.h |
+++ b/net/url_request/url_request.h |
@@ -60,6 +60,18 @@ 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 { |
+ // Add the LoFi header to the request. |
+ LOFI_ON = 0, |
+ // Do not add the LoFi header to the request. |
+ LOFI_OFF, |
+ // Check with the network-quality-based triggering logic and add the header if |
bengr
2015/08/25 00:00:02
See my previous comment about not specifying the i
megjablon
2015/08/25 20:29:47
Done.
|
+ // the network is slow. |
+ LOFI_DEFAULT, |
+}; |
+ |
//----------------------------------------------------------------------------- |
// A class representing the asynchronous load of a data stream from an URL. |
// |
@@ -298,6 +310,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); |
+ // TODO(megjablon): Add comment. |
bengr
2015/08/25 00:00:02
Add it.
megjablon
2015/08/25 20:29:47
Done.
|
+ void set_lofi_state(LoFiState lofi_state); |
+ |
+ LoFiState lofi_state() const { return 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 +846,9 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe), |
scoped_ptr<const base::debug::StackTrace> stack_trace_; |
+ // TODO(megjablon): Add comment |
bengr
2015/08/25 00:00:02
Add it.
megjablon
2015/08/25 20:29:47
Done.
|
+ LoFiState lofi_state_; |
+ |
DISALLOW_COPY_AND_ASSIGN(URLRequest); |
}; |