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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2910783002: Adds Lo-Fi fallback support for new Data Reduction Proxy protocol. (Closed)
Patch Set: Added integration test the excercises page-polices fallback Created 3 years, 7 months 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: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 8ff540e93bfe07d49b3cacacc4f1a6987ea39c47..77014148d88a1308c2cc1c6c3b073da2502e5f89 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -131,6 +131,7 @@
#include "content/renderer/pepper/pepper_audio_controller.h"
#include "content/renderer/pepper/plugin_instance_throttler_impl.h"
#include "content/renderer/presentation/presentation_dispatcher.h"
+#include "content/renderer/previews_state_helper.h"
#include "content/renderer/push_messaging/push_messaging_client.h"
#include "content/renderer/render_frame_proxy.h"
#include "content/renderer/render_process.h"
@@ -3573,10 +3574,10 @@ void RenderFrameImpl::DidCommitProvisionalLoad(
// main frame documents. Subframes inherit from the main frame and should not
// change at commit time.
if (is_main_frame_ && !navigation_state->WasWithinSameDocument()) {
- previews_state_ =
- extra_data ? extra_data->previews_state() : PREVIEWS_OFF;
-
+ previews_state_ = PREVIEWS_OFF;
if (extra_data) {
+ previews_state_ = UpdatePreviewsStateFromMainFrameResponse(
+ extra_data->previews_state(), web_url_response);
effective_connection_type_ =
EffectiveConnectionTypeToWebEffectiveConnectionType(
extra_data->effective_connection_type());
@@ -3992,8 +3993,7 @@ bool RenderFrameImpl::ShouldUseClientLoFiForRequest(
if (!(previews_state_ & CLIENT_LOFI_ON))
return false;
- if (previews_state_ &
- (SERVER_LITE_PAGE_ON | PREVIEWS_OFF | PREVIEWS_NO_TRANSFORM)) {
+ if (previews_state_ & (PREVIEWS_OFF | PREVIEWS_NO_TRANSFORM)) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698