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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2910783002: Adds Lo-Fi fallback support for new Data Reduction Proxy protocol. (Closed)
Patch Set: Renamed helper method from Update* to Get* Created 3 years, 6 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 67ae44acdd11aee6bfad43f2c7fc953dcc39548b..9300a1ab5dd7e311e43c8cc548329598fc0ddbd1 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -132,6 +132,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"
@@ -3607,10 +3608,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_ = GetPreviewsStateFromMainFrameResponse(
+ extra_data->previews_state(), web_url_response);
effective_connection_type_ =
EffectiveConnectionTypeToWebEffectiveConnectionType(
extra_data->effective_connection_type());
@@ -4046,8 +4047,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;
}
« no previous file with comments | « content/renderer/previews_state_helper_unittest.cc ('k') | content/renderer/render_frame_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698