Index: content/common/navigation_params.h |
diff --git a/content/common/navigation_params.h b/content/common/navigation_params.h |
index 37b1af035401ee8e9ab394831888b68c6519e4e9..7125a746df01407b446ec59f88b3c43b388f9935 100644 |
--- a/content/common/navigation_params.h |
+++ b/content/common/navigation_params.h |
@@ -22,6 +22,18 @@ class RefCountedMemory; |
namespace content { |
+// The LoFi state which determines whether to add the LoFi header. Must stay in |
+// sync with the enum in url_request.h. |
+enum LoFiState { |
+ // Add the LoFi header to the request. |
bengr
2015/08/25 00:00:02
I would make the comments more declarative, e.g.:
megjablon
2015/08/25 20:29:46
Done.
|
+ 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 |
+ // the network is slow. |
+ LOFI_DEFAULT, |
+}; |
+ |
// PlzNavigate |
// Helper function to determine if the navigation to |url| should make a request |
// to the network stack. A request should not be sent for data URLs, JavaScript |
@@ -191,7 +203,8 @@ struct CONTENT_EXPORT RequestNavigationParams { |
int pending_history_list_offset, |
int current_history_list_offset, |
int current_history_list_length, |
- bool should_clear_history_list); |
+ bool should_clear_history_list, |
+ int lofi_state); |
~RequestNavigationParams(); |
// Whether or not the user agent override string should be used. |
@@ -257,6 +270,10 @@ struct CONTENT_EXPORT RequestNavigationParams { |
// needs to notify the browser that the clearing was succesful when the |
// navigation commits. |
bool should_clear_history_list; |
+ |
+ // Whether or not the LoFi header should be added to the request or if the |
bengr
2015/08/25 00:00:02
Not necessary or desirable imho to describe how Lo
megjablon
2015/08/25 20:29:46
Done.
|
+ // decision should be left up to the network-quality-based triggering logic. |
+ int lofi_state; |
}; |
// Helper struct keeping track in one place of all the parameters the browser |